Sunday, December 27, 2015

Light Blue Bean and Neopixels

Adding more than three neopixels may require the addition of a voltage regulator, 
a transistor, and resistors.
Using the Blue Bean app, I can control LEDs from an iPad.

I've been experimenting with neopixels, using a Gemma, an ATtiny85, and most recently the Light Blue Bean.  While I am most excited about the potential of the ATtiny85, because of its smaller size and cost, I am also intrigued by the idea of controlling a gadget wirelessly.

Using the code from the Smartphone Controlled Mood Light project, modified to accommodate fewer LEDs, I'm able to control the color of three neopixels soldered to wire. So far, I'm only able to change the color of all the neopixels at the same time, rather than being able to customize each one individually.

If I changed the code to accommodate two LEDs, I could use this to control two glowing eyes, which would be a much easier way to do this than the Evil LED Goat project.  If I wanted to be able to remotely change the color of a hat or other wearable, this could also be useful, although doing so seems like a waste of a $30+ microcontroller.

My next step is to try to modify the code to make use of the accelerometer and or the buzzer. While I like the idea of being able to change the color of a project remotely, I'm interested in using the Bean for something a bit more useful.  I have a lot more to learn first.

Friday, December 18, 2015

Running Neopixels on an ATtiny85

ATtiny85 controlling sewable neopixels
Today, I am learning how to use an ATtiny85 to program sewable neopixels, with the goal of moving toward using surface-mounted RGB LEDs in paper circuitry.  The reason that this is so exciting is because the ATtiny85 is an inexpensive, low-profile chip, making it useful for notebook hacking and art projects!  If I can figure out how to make this entire process happen on a Chromebook, it would be a huge breakthrough for classroom instruction.

At the time I was working on this project, there was still one step that required the use of a PC: the process of burning a boot loader/ changing the fuse timing on the ATtiny85.  To use neopixels, the ATtiny85 needs to run on an 8 Mhz internal clock, rather than the default of 1 Mhz. As of 11 January 2016, this issue has been fixed, making it incredibly easy to do this type of thing with students using Chromebooks!

Once I converted the chip to 8 Mhz, I was able to use CodeBender and a Chromebook to program it with neopixel sample code (with only a couple of small tweaks).

My next step was to see if I could apply this new learning to building a paper circuit with copper tape and surface mounted RGB LEDs.  The photos demonstrate a prototype using the surface mounted RGB LEDs soldered to wire!

Since I was able to get the LEDs to do what I wanted with wire, I am 100% convinced that this can be replicated with copper tape!  Stay tuned!

ATtiny85 controlling SMD RGB LEDs

Updated 19 Dec 15:
I've created my first paper circuit with neopixels!  To learn more, visit

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.

Tuesday, December 1, 2015

Video Tutorial: How to Program an ATtiny85 with Codebender and a Chromebook

How to Program an ATtiny85 with Codebender and a Chromebook (Using an Arduino Uno as an ISP)

Chromebook and CodeBender
Several educators have asked me about paper circuitry and expressed interest in the idea of having their students code microprocessors for notebook hacking projects. After several days of work, I've finally completed the video tutorial that I've been promising.  In the process, I learned more than I expected.  For example, Codebender recently changed some aspects of its set-up, making it somewhat difficult to find the option to select a programmer.  I also learned that Codebender will soon be compatible with Chrome and the TinyAVR programmer from Spark Fun; it is already compatible with Firefox.

Update:  As of January 2016, Chrome is compatible with the TinyAVR Programmer! 

The video below is best viewed in high definition.