Monday, December 14, 2015

Program an Ugly Christmas Sweater with CodeBender

My daughter recently asked me to transform a red sweater vest into an ugly Christmas sweater for a special event at her school. Using a Gemma microprocessor and four neopixels, I made one that flashes and changes colors at the push of a button.  I originally used my PC to program the microprocessor, but a friend prompted me to see whether the same results could be achieved with CodeBender and a Chromebook. I'm pleased to report that the Chromebook worked like a charm. I simply connected the Gemma to the USB port, selected the buttoncycler sketch from the Adafruit Neopixel library, modified the code to match the pins on the Gemma and the number of neopixels used, and voila'.  In the past, I have found the Gemma to be a little finicky when programming in the cloud, but CodeBender is constantly improving.

In the process, I learned:

1.  how to program a Gemma with CodeBender (even though no ports were detected)

2.  how to use a multimeter

3.  the importance of using a stabilizer when sewing with conductive thread on a loosely woven material

Unfortunately, I had to learn a couple of lessons the hard way when threads in the stretchy sweater kept shorting out!

In order to increase the versatility of this sweater, I sewed the Gemma to three tiny snaps sewn to a piece of felt. When folded up, the felt supports the battery and fits into the sweater pocket.  This connects to three more snaps to complete the circuit.

I sewed the neopixels to a ribbon.

Originally, I sewed the neopixels directly to the sweater.  That didn't work out well, because I didn't stabilize the back of the fabric first, requiring me to have to rip out all of the stitches.

Afterward, I used what I learned from Adafruit's chameleon scarf tutorial to sew the neopixels onto a ribbon that I later sewed to the sweater using non-conductive thread.

I applied self-adhesive stabilizer on the back.