Ersatz Nature: Firefly

Continuing with my exploration of simulating nature through technology, I created this LightLogo firefly sculpture. 

I built the prototype for this project around a wood dowel and a 60 LED neopixel strip connected to an Adafruit Metro Mini running LightLogo. The microcontroller also had an LDR sensor connected to it so LightLogo could respond to the ambient light.

I wanted to fabricate a base to hold the dowel and contain the microcontroller. I found a cool 3D printed grass model. I modified it in Tinkercad to add a hole for the dowel. I struggled with getting the 100mmx100mm square to print for a bit but eventually got the 50mmx50mm model to print. 

However, the grass was way too fragile for a permanent sculpture.

I returned to Tinkercad and used two of the shape generators to design a base that had a recess in the underside to hold the Metro Mini.

For the first time I used the "pause at z height" option on my Makerbot Replicator because I knew precisely when I wanted to swap in the green filament. I also placed the "helper disks" in the corners to minimize lifting during the print.

The resulting model looked awesome.

Meanwhile, I decided that the dowel was too bulky. I bought a 1/8 inch steel rod and used the drill press to drill holes in two pieces of dowel, one to hold the rod, the other to cap it so nobody loses an eye.

The neopixel strip is gently wound around the rod. The LDR sensor is mounted on the base.

The LightLogo procedure is pretty simple.

to startup 
setstripsize 60
loop [
ifelse sensor0 < 20 [ 
wait random 100 250
wait random 1000 2500
] [wait 100]

to firefly 
setpos random 0 60
let [direction random -3 3]
print :direction
setc random 5 19
setbrightness random 5 20
repeat random 3 5 [
fd :direction
wait random 100 250 ]
The results are a good simulation of fireflies coming and going during the summer. Here is a video of the software running with the dowel still in place.