October 03, 2018
I decided to build an LED firefly jar for this week’s Intro to Physical Computing assignment. It was inspired by the 6 oz mason jar I found in the junk shelf and this blog post by Trevor Shannon. My Intro to Fabrication week 5 blog post goes more in depth on the fabrication aspects of this project.
As always, the first circuit prototype I built was on a breadboard. 5 yellow LEDs acted as my fireflies and they each used a 220 ohm resistor. Each fly was connected to an Arduino digital pin that supported analog writes. This is because I wanted the LEDs to fade in and out, so it required pulse width modulation (PWM). The first program faded all the LEDs in and out at the same time and rate.
I then refactored the program to fade the LEDs at different rates and intervals.
This program relied on ordered arrays to correspond to the different properties of each fly (code), however my OOP background would have preferred to store these kind of properties in a firefly-like object. Each fly individually tracked whether its fade interval had passed without delaying/holding up the entire Arduino process.
Once I had a working breadboard prototype, I started to solder the circuit onto a PCB that could fit inside the mason jar. Roland was kind of enough to lend me a PCB that had a breadboard layout to make soldering to common ground easier.
Here are two videos of the final product:
Some thoughts I had if I continue to iterate on this idea:
A perpetual work in progress blog documentating my NYU ITP projects. Words are my own.