Week 2’s assignment for Light and Interactivity is to replace the look and feel of a candle, without the use of a flame. In class we were given an Adafruit Jewel; seven NeoPixels in a circle.

What does it mean to be a candle?

For the first prototype, aside from the colours within a flame I focussed on 3 elements of my reference candle:

  • The interactivity: how it feels to turn a candle on and off.
  • The intensity of light at various parts of the flame’s life.
  • The texture: The general shape and texture of the flame, what is opaque, what is transparent.

In reverse order from above:


The first thing I noticed about the candle’s flame is that there’s a section of transparency above the wick, with the brightest part hovering a bit above that. I tried to recreate this effect using rods of refractive acrylic, which I sanded near the top and left clear at the base. Hot glue offered a good way to stick the rod to the pixel with a bit of flexibility; permanent enough to hold but not so permanent as to damage the pixel if I chose a different direction.

Unsanded Rod
Sanded Rod

Intensity & Colour

Different parts of the flame flicker differently. In general, unless there’s a strong disturbance, the core remains a bright, mostly consistent yellow, perhaps with a relatively low frequency flicker. The parts around the core flicker more quickly from yellow to orange, and by the tip even red.

I tried to recreate this effect by giving each pixel its own HSI array, and then flickering/fading each pixel according to its own values. It involved a silly amount of arrays. The pretty messy code (it’s a prototype!) can be found at this GitHub link.


The class is called Light and Interactivity after all, so I figured I would have a bash at replicating some of the emotional investment that you put into a candle. With candles, you don’t just flick a switch or wiggle a wire to turn them on or off. You have to go through the process of lighting a match and holding it close to the wick. Maybe the first go doesn’t do anything. Then to turn it off you must blow it out, but just in the right way. How many of us know the struggle and embarrassment of failing to successfully blow out all the birthday candles on our cakes??

To try recreate this feeling, I split my sketch up into 4 sections. 1) Off. 2) Turning On. 3) On. 4) Turning Off.

While in Off, the sketch listens for a high light threshold on an LDR (intended to give the experience of ‘holding a match’ to the wick). This activates Turning On, which runs over a set time. After completing, Turning On transitions to On. While in On, the sketch listens for input from a microphone pretending to be a wind sensor. Blowing on the wind sensor affects the Intensity values of each pixel, but they will return to full brightness unless a high threshold is met. Once the threshold is met, the Turning Off sequence activates and the sketch comes to an end.

The high threshold for the wind sensor trigger has the added bonus of making it a bit difficult to blow out the candle. I stumbled upon this effect accidentally, but it definitely feels to me as if I’m trying to blow out an obstinate candle irl.

A few notes about the video above:

  • The ‘Turning Off sequence fades the LEDs from the outside in. My goal is to recreate the appearance of a dying ember.
  • Right now the fade is a bit jagged; the values are jumping down in chunks over discreet intervals, which gives a staccato appearance to the fade. While I’d love to fix this asap, I’m considering it an ‘edge case’ for this version; something that would be nice but it not essential to the core of the experience I am trying to create.
  • I have a handy line of code void(* resetFunc) (void) = 0; which allows me to reset the sketch at the end of the cycle, easily setting up the candle for another go.