We got a couple of Codebugs just before Christmas and have been having quite a good time playing with them so far. You write code for them using an online IDE based on Google Blockly and the device itself has two buttons, a 5×5 grid of LEDs and 4 GPIO ports with nice croc-clip friendly contacts on it so you can straight away start playing with linking code to the physical world. It also has an expansion connector (the ‘Tail’) and when you connect it to a PC via USB it comes up as a mass storage device and you drag code across to it to run it.
We’ve done the obligatory “scroll your name” across the LEDs, hooked up fruit to create a fruit ‘touch’ keyboard and have started exploring some of the projects available via the online community.
My only slight gripe is that the mechanism for getting code on it isn’t quite as intuitive as it might be. We’ve largely got the hang of holding buttons down whilst powering it up. although, when trying out code, it tends to stay plugged in, so we use the ‘reset’ then ‘hold’ technique designed for when it is powered by battery most of the time. However sometimes the buttons aren’t held quite long enough for it to register. Also, every time it comes up in mass storage mode, the previous programme is erased. If you are not careful you end up with lots of “compiled” Codebug programmes lying around your browser’s download directory. Seeing as all projects are managed by the online IDE it would be nice if there was a neater way to send the code straight to the Codebug without copying between directories.
That aside, its a great device and has generated lots of interest with the kids and I’ve recently purchased a set of Glowbugs. These are WS2812 based RGB LEDs with simple croc-friendly (of course) contacts that you connect to the Codebug using the GPIO, configure and off you go.
For our next project however, we quite wanted to use all 4 GPIO as inputs and I know that the Glowbugs can be driven directly via the expansion header, so I set about seeing if I could create a DIY ‘tail’ connector to breakout the CS, +5v and GND connectors, as used by the Colourtail, to something that would accept croc clips.
I also have a cheap, purchased from China, 24-LED WS2812 pixel ring with the same +5, GND, DIN, DOUT interface as Neopixels and the Glowbugs that I wanted to use. I’ve already connected this up via the Codebug Tail, but again wanted something croc-clip friendly that the kids could use.
So armed with a 20x80cm prototyping board and some right-angled headers, I set about making a simple DIY tail adaptor and connector for the LED ring. Warning – massively dodgy soldering coming up.
As a major goal was to make this easy for the kids to use, I wanted the connectors to break out in the same order as the Glowbugs – so (with all boards face down) this means from left to right, GND, DIN, +5v. However the tail connectors are CS, GND, three not required for this application, and VCC, so I needed a wire link to get CS (for the data) from the left-most pin to a central spot.
With a small portion of board cut and smoothed ready for headers, I decided to use crude solder blobs as a simple way to create croc-friendly pads and connections, as can be seen via the very dodgy soldering going on in the following! In case you can’t quite make it out, the ‘circuit’ is highlighted in the last pic.
So after adding another three ‘pads’ on the other side, the final thing looks like this.
In order to be able to easily use the LED pixel ring, I decided on a similar approach to add some ‘pads’ to the ring. Once again I wanted the pads in the same order as a Glowbug. I could have added both an ‘in’ and ‘out’ connector, but decided for simplicity only to create an ‘in’ – so the ring will always be the last thing in the chain. In the following, the wires are coloured as follows: green is GND, blue is DIN and red is VCC.
The biggest problem with just connecting the pixel ring directly to the Tail connector was the poor physical connection of the wires to the ring itself, so this time to give it a degree of kid-robustness, I used a hot-glue gun to stick the pads to the ring and protect the solder links.
With a final blob of glue over the top of the solder connections to the ring, everything is ready to go.
So to use the Glowbugs connected via the DIY tail, you have to use the configuration blog to enable the ‘Colourtail’ rather than ‘Glowbug’, but otherwise, everything else is just the same. And of course, the ring is just treated as a set of additional 24 Glowbugs added on the end of the chain.
So crude, and soldering that will definitely not be winning any prizes, but it works, and passes first contact with the kids.