It's that time of year when my family ask me for ideas of presents for Christmas and my Birthday. (both December)
With electronics bits being a bit specific/esoteric I stopped trusting that if I said what I wanted they would get me the right thing after I gave my wife a link without a description for a new CPU.
By the time she clicked it the link redirected to a few screws. Luckily she checked before buying and I was able to get her the alternative link.
So, these day I provide a wish list email with more items than I expect to get so I still have the surprise when I open the packaging as to what they give me.
This year I've decided to share the list. This list may be added to as I think of more things.
Before you ask things like Arduinos, Raspberry Pis, Circuit Playground boards are not on this list as these are things I have usually already got a stash of. This list is for the other bits that make those things useful. The kind of things it would be useful to have before starting a project but may not have already or may have run out of.
I try to keep the items to less than £20 so for many these are good stocking fillers.
I buy random items off the Internet and for batteries and USB PSUs I want a way to see if they meet their stated ratings.
Heat Resist Soldering Mat - £9.90 - £15.00 - There are bigger and smaller ones out there as well. I have a regular A3 cutting mat but like this because of the different compartments to keep bits as I regularly drop screws and tools and hope this will help me be more organised when working on something.
I sometimes use buttons with spade connectors and at the moment I solder the wires on which is not ideal. Want to start using the correct connectors for the correct job and not just bodge something that later causes a headache that I have to fix.
Anker 4-Port USB 3.0 Hub - £10.99 Sometimes for the Raspberry Pi I need to burn multiple SD cards. The great Etcher will burn multiple images at the same time so with this I can add 3 more to be burned in parallel (it's not 4 as I lose a port to connect it)
Starting to try and be more organised so like the idea of this set of wires. I have loose spools of wire around the place so the plan is to replenish the spools when they run out.
Having recently committed a project to an actual prototyping board rather than using a breadboard I want to do more of that for my Raspberry Pi projects so need a bunch of 2x20 female connectors to hand. Last one I used I 'borrowed' form a Kickstarter I backed, so that's now an incomplete kit.
I've been meaning for a while to set up a permanent workspace for doing electronics and finally cleared a corner of the garage.
Once cleared I of course needed a workbench and whenever I searched on line this steel bench kept coming up. Listed on the UK eBay for about £50which to me seemed like an OK price to pay for a bench with main surface size of 120cm x 59cm and with a drawer the full length of the bench.
I asked on Twitter what it was like and a few people replied that the metal is quite light but it's sturdy once built.
I got one and for £50 I think it's definitely worth the price.
The metal frame is not the strongest or thickest metal I've seen and without the wood tops being in place it does flex. I expected to have to add braces at the side and back but in the end they are not needed as once the work surface and other wooden pieces are added it gets nice and rigid.
One thing to be aware of is the wood is MDF and so has limited strength in itself.
The lower shelf on mine is flexing already due to the boxes I have on it. I note this in the video below and also my plan to add some wooden battens to support the lower shelf.
The lower shelf and the work surface are not screwed down and are held in by the frame so it will be easy enough to lift out the self add the battens and put the the shelf back on.
The draw was also pointed out to be quit flimsy and I agree. It's not robust but it works and for tool and storage for light parts it will do the job. Again the base on the drawer is MDF.
The back pegboard on mine is slightly bowing out. Not sure if I've done something wrong or if it's the kit. The top shelf is OK. Again I'm not expecting it to take much weight but as a place for odd small bits it will work well. It's also high enough above the main work surface that it should be ideal for adding additional lighting in the future. Maybe some RGB LED strips
Finally, the instructions are really poor. The kit I received wasn't missing any parts but let's say with my flat pack skills it took me a fair while to get it all together.
The one tip I'd give is watch the number of holes in the metal parts to figure out which way is up.
So, overall I'm very happy with the bench. I've used it a fair bit since getting it and I like the size. Much smaller and it would be a challenge to have equipment out and have a decent sized work surface. (There is a smaller sized version that's 81cm x 41cm and from searching eBay there are also versions without the back and top shelf.
Finally, here's a video of the bench so you can see what it's really like.
For the most recent Egham Raspberry Jam @EghamJam we did two workshops.
One was NoPi Blinky, making LEDs blink without any programming. More to come on this as during the workshop we found a few typos.
The other was Shakey Shakey.
For the workshops my goal is to do something slightly different that not only teaches the attendees something new from either a programming or electronics standpoint but also shows them creative options.
Shakey Shakey was based around really simple tilt switches. They're basically a small tube with a contact inside that moves as you tilt the tube. Really simple and really cheap. On eBay UK they're about £1.50 for 20. So, ideal when you need a bunch for the Jam
The only other things needed then were some female-female jumper wires and some 2 core wire.
I cut the female-female wires in 2 giving me a pair of wires that had the female connectors on one end and bare wire the other. Cut the 2 core wire into about 150cm lengths and used them to connect the switch to the other wires giving a nice long wire for the kids to shake without (hopefully) unplugging the wires or pulling on the Raspberry Pi.
With the hardware sorted I them did the worksheet which is available to download from GitHubalong with other Jam worksheets.
Python code to read the switch and display how many times it connects
Adding a pause to deal with debouncing
Adding a second tilt switch
Updating the code so the switches have to be activated alternatively
Final update of the code to add a timeline making it into a game
We had a full workshop and the kids who took parts seemed to really enjoy the coding and then playing the new game they created.
At the end I challenged the participants to come back to the next Egham Raspberry Jam (21st October 2018) with their own program that uses the same tilt switch controllers. The worksheet at the end gives some suggestions. Here's looking forward to the 21st of October to see what fantastic creative ideas the kids come up with.
When I attended PiWars (a great event for people who like to build robots using the Raspberry Pi)earlier this year I saw a whole range of controllers being used for controlling Raspberry Pi based robots. With many using USB dongle ones and others using Bluetooth or even apps on phones. Expecting to see some BlueDot next year a great Android App for controlling things over Bluetooth.
What I liked about it is that it uses AAA batteries so if at an event the batteries died I could swap them out. No need to wait for recharging.
It's billed as being for mobile gaming and virtual reality and no mention of working with a regular computer or even Raspberry Pi, so I took a punt for £1.85, well actually £3.70, as I bought two. (walking on the wild side).
I've seen some similar listing with switches on the side. This is not the model I have bought. Mine has no switch.
What it looks like on eBay listing
They arrived and actually look good. Plastic is definitely cheap, but they don't feel flimsy.
Below are a couple of pictures of the real thing. A little different to the render but I'm happy..
Top. Joystick, power button, mode change button and 4 facing buttons.
Front has 2 additional buttons for when held straight rather than sideways
Time to start testing.
Setting up a new Raspbian image and using Raspberry Pi ZeroW I added the two AAA batteries and it came on. Blue light flashes to say ready to pair.
Using the Bluetooth Add Device in Raspbian the device VR BOX was found and paired successfully. The unusal name actuallymakes sense as the listing on eBay is for "3D Bluetooth Virtual Reality Glasses VR BOX Game Remote Control Gamepad Handles"
Bluetooth on Raspbian paired with VR BOX
From the eBay listing and the single sheet of instructions the Gamepad/Nunchuck has 4 modes that you select with a combination of the @ and the relevant button.
A : Function Select (Music Video Mode.)
B : Function Select (game mode)
C : Function Selection (VR video self-timer mode.)
D : Function Select (mouse self-timer mode.)
It starts up in Music mode, so to use as a gamepad you have to change this after it pairs.
As I wanted to test in game mode I did [@]+[B]
I previously created a small python/pygame program to help with the testing. It's available on GitHub.
I downloaded it to the PiZeroW (one of these days I'll do the proper git clone thing) and ran the program.
I run from the command line as the terminal window prints the details in text while the pygame window gives a graphic representation of the gamepad so I can see if multiple button presses are possible and which button numbers are pressed. The code includes an analogue joystick so it will show the full range of movement for the gamepad joystick.
python2/pygame gamepad tester
Pressing the buttons the appropriate red square appeared and the terminal window stated which button was pressed or released. Success! It's being detected as a gamepad and the buttons are working.
I then used the joystick which looks like an analogue stick you see on many projects. Only it's not. The joystick is digital. Up, Down,Left,Right. No range in values. Except for a strange thing.
The positive values are 0.999969482422 and the negative values are -1, so you can't test for 1 for down and right when in gamepad (sideways) mode as 0.999969482422 is not 1. A little gotcha for coding.
The different modes
As listed above there are 4 different modes for the controller.
[@]+[A] for music
Nothing happened on the Pi. I haven't figured out what Bluetooth Music Mode is yet. I tried this mode with my phone and it does provide volume up/down, mute an play so does what is expected with the target device.
[@]+[B] game mode
This is gamepad in horizontal mode, like a traditional controller with the joystick on the left and the buttons on the right.
For example, if you push up the Up joystick is detected
[@]+[C] VR video self-timer mode This is a gamepad in Nunchuck mode. So vertical. For example, if you have the controller held vertically and press up then Up Joystick is detected. All the buttons are the same as for game mode. [@]+[D] mouse self-timer mode Guess what the joystick operates like a mouse held like a Nunchuch (vertical) with the lower front button (trigger) being left click and the higher front button (trigger) being right click. In mouse mode buttons A and B still get recognised as gamepad buttons so that could be useful.Not sure how or when but extra buttons are always useful. Button combinations In game mode some of the buttons could be pressed at the same time while others could not.
@ and Power are reserved so have no button function. Bottom trigger and top trigger could not be pressed at the same time. Lower trigger always took priority even if upper was pressed first.
Bottom trigger could be pressed with any of the face bottoms (A,B,C,D). Same for Top Trigger.
A could be pressed with C, but not B or D. A stays active and the others do not show. If you press B or D first and then press A, A will be activated and the other will be released.
B and C can be pressed at the same time
D is over ridden by all face buttons, so if you have D pressed and then press any of the other their function is activated and D is released.
Also, either trigger and two button face combinations that were noted to work above will also work. So, if you need 2 buttons at the same time and one is the master and the second one needs to be one of 4 I'd recommend using a trigger as the master and the face buttons as the secondary as this works for all face buttons.
If you need 3 buttons then there are a small number of combinations that will work.
Top button, A and C worked for me.
Future Note: I have a feeling this section may need a chart of some nature. Need to figure out how to represent it.
For Python/Pygame and I expect other system the buttons are numbered:
Gamepad Mode Face button arrangement A C D B
Top Trigger: button 7
Bottom Trigger: button 6
A: button 4
B: button 0
C: button 3
D: button 1
When I saw it changed I thought the button values would have turned clockwise 90 degrees so the buttons were in the same position (top, left, right, bottom) would have the same values but they don't. Top and bottom shift correctly, but left and right are mirrored.
Where did 2 and 5 go. I wonder if they're on the board and not broken out. Might be a tear down thing
Summary
For £1.85, or £1.99, last time I checked if your need is digital controls then I think this is a hit. It paired easily. The instructions though really sparse are enough to change modes. With a phone it does the media things promised from mode A and on the Raspberry Pi and expect and device that supports a Bluetooth Gamepad and Mouse it does exactly what it says on the tin.
For controlling robots it's ideal (except for no analog).
Joystick for direction control and then buttons for other functions. Maybe take a picture, fire a missile, change mode from piloted to auto mode for different challenges at an event like PiWars. With the advantage of using regular AAA batteries there is no fear that at an even the controller will run out of power and need to be charged.
A little but extra
As each controller having a unique Bluetooth Device ID it's possible to set up a cronjob on Linux to pair with a specific gamepad when the Raspberry Pi (ZeroW) is booted/rebooted so at events if you had 5 robots, 5 controllers each controller would be set up to work with a specific controller It's not too complicated to do.
Get the device ID for the VR Box using the command bluetoothctl
Mine was FF:FF:70:00:76:8B
Run crontab -e
Select your editor if running for the first time. I use Nano
If using Nano do a [ctrl]-[x] to exist and 'y' to save.
Reboot an you're done.
This will try to auto pair when the Pi boots.
You can also do a cronjob to continuously try to reconnect and not just at boot.
This is useful if the Pi has completed booting before the gampad has been turned on or if the controller hasn't been used for 10 minutes or in pairing mode fails to pair after 3 minutes and so needs to repair when the controller is turned back on
IMPORTANT: The code in this blog post is the original code which does work but may not have all the enhancements. If you're building your own I recommend grabbing the code from GitHub.
GitHub link: https://github.com/winkleink/buttonFlash
Update: 19th September: Took buttonFlash to the Cambridge Raspberry Jam on the 17th of September and it got a proper outing.
UPDATE: 25th August:
Made Raspberry Pi program look prettier
Added sound effects
A few years ago I thought it would be fun to come up with an outdoor game that would get people running around. The Whack-a-Mole/reflexes button game came to mind and this is the result. A game where you have to press buttons as quickly as possible.
Whack-a-Pi was in constant play at the Raspberry Pi 4th Party.
The concept for buttonFlash is similar to Whack-a-Pi but with the ability for the buttons to be much further apart. Goal is to get people running around. With the buttons further apart there was no way I was going to be managing physical wires as it would be a trip hazard and I didn't want to have to manage that many wires. So, wireless communication between the base and the buttons seemed the obvious choice.
Most fields don't have wifi. I could bring along my trusty Vocore and create a local WiFi hot spot but again I want this to be simple to set up and use.
VoCore. Basically guts of a Wifi router
So, I thought the NRF24L01 would do the trick. They're a really cheap transceiver. They can transmit and receive signals making them ideal for short range two way communication.
On the Arduino I used the RF24 library. If you've the latest version of the Arduino IDE you can install this through the library manager or if you prefer you can go old school and download it from the GitHub repository at the link above. More details on using the NRF24 with Arduino
The Arduino side was relatively straightforward to get working while the Raspberry Pi side had me stumped for a while. Then earlier this year I had a breakthrough when I met +Elliot Pittam. He had seen the first Wimbledon Raspberry Jam and was interested in coming along. On email we discussed what we were working on and Elliot said he was using the NRF24L01 with the Pi and Arduino. We then met at a HackWimbledon event where he showed me his set up and shared his working code. Elliot helped me sort my circuit and pointed me to 2 great videos on using the NRF24L01 with both Arduino and Raspberry Pi.
Tutorial 34 - Part 1
Tutorial 35 - Part 2
With Elliot's assistance I successfully had the Raspberry Pi communicating with the Arduino.
Many of the example I found did not clearly identify which pins on the Arduino or Raspberry Pi were connected to which pins on the NRF24L01. Therefore, below is the wiring I used for the Raspberry Pi and the Arduino with the code provided. So, it all matches up nicely.
NRF Pi GPIO Pin
VCC 3.3V 1
GND GND 6
CSN GPIO8 24
CE CPIO17 11
MOSI GPIO10 19
MISO GPIO9 21
SCK GPIO11 23
NRF Arduino VCC 3.3V GND GND CSN Digital 10 CE Digital 9 MOSI Digital 11 MISO Digital 12 SCK Digital 13
For the Arduino to keep it compact I went with Arduino Nano compatible board on a small 170 pin breadboard. Easy build and easy maintenance.
It's important to know these compatibles use the CH340G serial chip which is different to the Arduino branded. You will need additional driversto get these working with some computers.
To make each of the buttons base I needed a suitable container to hold the button and the rest of the electronics and of course the button. I'd seen these great 60mm buttons with LEDs built in so I order some. Again from eBay UK these are about ~£7.00 for five.
RED 60mm LED button
The ones I ordered are 12V rated which is the power for the LED. Opening it up these things just have a standard LED and a current limited resistors. The resistor was a 460 Ohm for the 12 volts. Without knowing the specific LEDs and their voltage drop and maximum current I played it safe and replaced the 460 Ohm with 150 Ohm resistors. The buttons did light very dimly with the 460s but were far brighter with the 150 Ohm. Below is the button being taken apart.
button in place
unscrew the button/LED assembly
pull out the LED (like Christmas lights)
remove LED with resistor on Anode (+ side, other goes to GND)
solder on replacement resistor and put it all back together
To test the LED at each stage I ran an Arduino with the blink sketched and wired the LED across pins GND and 13. Once all reassemble with the wires attached again I tested to make sure I didn't mess things up in putting it back together.
Next, for each Arduino I wired the NRF24L01 as per above. The LED was wired to Pin 2 and Button was wired to Pin 3. In code I activated the internal pull up resistor so the button is held high until you press it and then it goes low.
it all wired up.
As the Raspberry Pi needed to send a message to the Arduinos to let them know which one is to activate their button and wait for it to be pressed before replying I came up with a simple message that is extendable. Basically, the number of the Arduino followed by 'P' Examples: 1P, 2P, 3P, 4P, 5P
This would be the message sent out.
All Arduino would receive it and then using a simple IF statement would decide if it means they are to be activated. If not go back to listening. If yes light the button and wait for it to be pressed. Once pressed reply to the Raspberry Pi that the button has been pressed.
In this way the Arduino are dumb. They only respond to a request for the button and reply it's been pressed. They don't care if they are the first, second, third,... button to be pressed in the game. All that is managed at the Raspberry Pi.
To make it easier to setup and to test I included a test mode.
When you press 't' it sends the test message and all the Arduino flash their LEDs 5 time. Then Arduino 1 (as there will always be at least 2 Arduino) replies that it is completed.
The Raspberry Pi doesn't do anything with this message as the test is to see if it is sent and replied to which the users sees in the console.
This means Button/Arduino 1 has slightly different code to all the rest of the buttons.
Button/Arduino 1 code with the extra bit for Arduino 1 only highlighted in RED
For each Button/Arduino the text highlighted in BLUEneeds to be changed to matched the relevant reference in the Raspberry Pi list. This text is the same in all 3 locations so you can do a Find/Replace to do it in one go.
Serial.println("We sent our message: " + String(text));
}
// Test scenario
if (stringMessage == "TEST") {
for(x=0; x < 5; x++){
digitalWrite(ledPin,HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
Serial.println("Test completed");
const char text[] = "Test done";
radio.write(text, sizeof(text));
Serial.println("We sent our message: " + String(text));
}
}
delay(100);
}
On the Raspberry Pi side the code is a little more interesting as it sets up the NRF24L01 and then creates a graphical window using pygame and finally runs the game. At this stage it displays Score and High Score.
The steps to get the Raspberry Pi ready are:
Wire up the NRF24L01 as per above
Use the Raspberry Po configuration program to enable SPI (you have to reboot after this)
Then run the following commands.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-dev python3.dev -y
I'm assuming you're in hour home directory for the rest of this.
mkdir buttonFlash
git clone https://github.com/Gadgetoid/py-spidev
cd py-spidev
sudo python setup.py install
sudo python3 setup.py install
cd ..
git clone https://github.com/BLavery/lib_nrf24
cd lib_nrf24/
cp lib_nrf24.py ~/buttonFlash
cd ..
You should now have SPI working with the python SPI libraries installed for Python 2 and 3 as well as the required lib_nrf24 for working with the NRF24L01 from python.
Finally the library file is copied to the buttonFlash directory.
Copy the Raspberry Pi code into the buttonFlash directory and run it.
Here is a short example of it running after the initial build.
With the electronics sorted and the programs functioning the next requirement was a housing for the buttons. I thought I found the perfect one when I got this spaghetti container from Home Bargains. It all fit comfortable and the button was really secure.
Only problem was when I went back to get more they were out of stock with no idea when/if more would be coming in. Then I saw the Pringles can and tried it out and it worked. Pringles cans for the win.
Oh, and I had to eat another 4 cans of Pringles to get the 5 required.
As this is designed to be played indoors or outdoors I needed to fina a way to make them stable when placed in a field. I went super simple and bought 150mm bolts with nuts and passed them through the bottom of the Pringles cans. You'll notice I numbered each can and there is also a colour listed. I bought 5 different coloured breadboards so I could tell which Button/Arduino was in each can.
You can see the bottoms of the tubes are deformed a bit. Ends up Pringles cans aren't super strong. Means I have to re-tighten the nuts as they work lose. Wonder if an application from a glue gun will sort this out.
bottom of each Tube with bolt, number and colour
all the bits outside the can.
If you watched the video at the top or the video at the bottom you might have noticed the Pringles cans have a bit of a base to keep them stable for indoor use. In the rush to push the buttons the Pringles cans were falling over. The solution was some microwave pots that tapered from the bottom to the top turned upside down and with a hole cut int he bottom. This gives a nice wide base. If further stability is needed these pots could be filled with sand or stones to weigh down the bottom even more.
microwave pot used as base
This was an interesting build as I never used NRF24L01s before. Finding the information on how to get them to work and wire them up was interesting as most of the guides nearly provided the full details and they all seemed to provide slightly different information. So, I enjoyed solving that riddle and end up with a playable game that scales in the number of buttons and also the space.
This could be set up as 10 buttons on a table with all the cans tied to each other or as 20 buttons around the outside of a field. You'll hear in the video below that the Raspberry Pi can call out the button numbers. This definitely made it a bit easier as you quickly learn which button is which position. For outdoor use if it is very sunny I have a feeling the LEDs in the buttons will not be bright enough. So, next I will be adding more lights and indicators to the buttons so they can be identified outdoors.
Here's another video of the game being played at the Cambridge Raspberry Jam.
If you have any questions or comments let me know.
Sometimes I've to do a little bit of soldering. Usually only a few wires and since at present I have no place to leave an iron set up permanently this requires for me to either unpack my rework station or even just a simple mains powered soldering iron.
Even doing this has resulted in me pushing back soldering jobs as the extra time for setup
as a ratio against actual build time doesn't feel like time well spent.
Then on eBay UK I came across a listing for USB soldering iron for £3.39
Since my electronics is usually tied to an Arduino or Raspberry Pi project I will have a computer up and running and I thought for less than £4.00 including shipped from Hong Kong it was worth a punt.
Well, it arrived this week and as per the picture it includes the soldering iron with a plastic cover for the top. A USB to 3.5mm jack for power. A really small stand made from a folded piece of metal with a bit taken out and just enough solder to know it's working. Actually I soldered about 30 wires using the solder provided and have a bit left over. Still you'll need to get some solder.
First impressions were positive. Packed in a proper retail packaging box and not just a jiffy bag like many cheap things on eBay from Hong Kong.
The iron heated up quickly and has a red LED to let you know it's on.
It was definitely hot enough to melt the solder and do the job I required.
Since the original outing I have used it again to replace some current limiting resistors for 5 LEDs in a project I'm working on. Again all worked great.
As I've only used it twice I can't speak for the long term reliability but from first impressions it is well worth the £3.39 it cost me.
The only things I would change are:
I would have liked the power to be microUSB and not 3.5mm jack. I've loads of microUSB cables but this is my only USB-3.5mm cable. If I lose it I'll have to get a new kit. Probably not a disaster at £3.39 and then I'd have a backup.
The tip on the iron is a needle tip. My personal preference is a bevel tip. The ones where it's like they cut a diagonal slice off a flat tip.
Here is a nice instructable explaining the different tips. My preference is called a C series tip in the guide. Rarely do really fine work and even then a bevel can still be used quite well for most things.
Saying all this for less than £4.00 it feels nice to use and means I can set up, do the rework and pack away in minutes. Which is ideal when only soldering a few wires at any one time.
UPDATE: after posting this I was sent a link to a great video by bigclivedotcom where he tests, tearsdown reverse engineers the circuit diagram. Let's just say his review is way better than mine.
Here's the video.
Last year I made some conductive paint using this Instructable. For me 50:25 by weight, paint to graphite powder works great. Make sure to stir in slowly otherwise the graphite powder will fly.
With this mix the paint is easy to apply yet has good conductivity.
It worked great and I used it at a Raspberry Jam to make flashing LED eyes for Halloween.
Since then the paint has been abandoned until my eldest daughter mentioned she was making circuits in school yesterday and I said I'd try to make them flashing LED Christmas Tree pictures.
This got a thumbs up from my daughters so the pressure was on.
Using Inkscape I drew a simple Christmas Tree with a place to put 7 LEDs.
Nice and simple and easy to print on A4 card. I made the baubles the shape of a physical LED so you can see which way to place the LEDs on the sheet. All the negative (ground, cathode) sides in the middle making it easier to connect all to GND later.
With the drawing done I added the LEDs. 6 to the green tips and a yellow one in the star. I had 2mm LEDs to hand so that's what I used. For the real thing I plan to use 5mm as the effect should be better.
I found pre-bending the LED leads at right angles so they are pointing down when in places made it easier to get the LED to stand up at the front. I also made small holes using a pin to push the LED leads through. It's hard to push LEDs through 300gsm card as the leads don't have a point.
Once this was done I turned over the card. Left the ground side for each LED pointing down and turned the positive side (anode) out at right angles pointing to the edge. Once done I used a small piece of tape to keep the LEDs in place. Tip. Push the leads down to they push against the card. It's means the leads lie flat making them easier to hold on with just paint.
Back of the card
As I mentioned the conductive paint had spent the last year drying so was a bit sticky meaning the paint job is less than smooth. I have since revived the paint with a little bit of water so for the kids it should be much easier to paint.
The bar down the middle is the ground tied to all the LEDs. The other lines are for the positive side of each LED.
If you want all wires to be at the bottom then you may have to adjust the SVG in Inkscape to only print one Tree per A4 landscape card.
To test I thought I'd use a Codebug I got in the Kickstarter and hardly used it since. They are no on sale at CPC Farnell
With the help of Twitter people (I didn't declare the legs as outputs at the top of my code) I put together the following program. Link to CodeBug site for project
CodeBug code
Once all this was done the LEDs flashed. Yeah!.
For this project I wired up the LEDs so the top and bottom on one side are paired with the middle one on the other side and vice versa and the star LED on a leg of it's own.
This only uses three (3) legs on the CodeBug,s o the 4th one (3) in the code is redundant. I just left it in there in case I can figure out a more exciting way to use 4 outputs to flash 7 LEDs.
Very Short video of the final tree.
Next I want to wire up to a Raspberry Pi to enable interactive input and independent control of all the LEDs and maybe play a Christmas tune as well.
Sidenote; Some might be asking where the current limiting resistor is. It's the paint. The conductive paint has a higher resistance than wire and so it is acting like the current limiting resistor.