The first week’s assignment for Light and Interactivity was to experiment with different types of LED fades. The technical output was “create an uninterruptible fade. With these constraints I found an adequate box in the junk shelf, glued on some googley-eyes, and created ‘LightBot, the anxious robot’.

Lightbot has a pleasant slow blue breathing when it’s asleep, a healthy green heartbeat when he’s awake, and a panicked ‘HELP ME’ fade when it’s upset. Lightbot gets upset when it’s turned upside down…

I spent a bit of time experimenting with different fades on an Arduino Uno. I settled on a fast sinewave for ‘happy’, a slow sinewave for ‘asleep’ and two quick pulses followed by a pause for ‘panicked’.

At the end of the code for the two pulses, ‘state’ is multiplied by ‘intensity’, creating the two on, two off pattern.

Once I’d found the right fades I used the Uno as a bootloader to load the sketch onto a ATTiny85 so I could fit all the electricals inside the body of LightBot. I followed this guide to set up the tiny.

ATTiny85 with an accelerometer on pin A2, and 3 distinct LEDs on pins 0 – 2