Week 5: Color Sound Pen Iteration 1

Assignment
Attempt an iteration on your project from last week.

Inspiration
Last week I used white light with my photoresistor, but based on conversations during office hours, I was curious to replace the white with red, green, and blue LEDs. How might those impact the input value readings from my same photoresistor on the same color cards? 

Materials & Tools
1 8 Ohm Speaker
1 100 Ohm Resistor
1 Photoresistor
1 10K Ohm Pulldown Resistor
1 Red LED 5mm
1 Blue LED 5mm
1 Green LED 5mm
3 220 Ohm resistors
4 Metal LED Holders 5mm
Solid Core Wires
Female-to-Male Jumper Wires
Header Pins (already soldered to speaker wires)
Arduino Uno
Arduino Web Editor (link to sketch)
Breadboard
Solder
Soldering Iron
4" Diameter Mailing Tube
White Card Stock
Construction Paper in Many Colors
Bookboard
Rubberband
Adobe Illustrator
Laser cutter

Process

Conclusions
Connected to my laptop I watched the input value readings from the photoresistor fly by on the Arduino Web Editor's serial monitor, and this week, in combination with the red, green, and blue LEDs, the photoresistor provided a tighter range of values for each color. I also noticed that slight changes in the position of the photoresistor or in the device itself (if I bumped it or pulled on it) would slide that tight range higher or lower in 5-20 increments very quickly, and it was tricky to pinpoint the settings to write into my code for the notes. I generally observed much greater sensitivity with the red, green, and blue LEDs. I did not expect that!

For comparison, I recorded the photoresistor's input value readings for each color under the device's different lighting setups. I documented my estimates based on what I saw in the serial monitor, and the readings likely to fall into a range of +/- 10 increments, hence the ~ symbol. The first reading is with the white LEDs, the second from the red, green, and blue LEDs:

White ~950 ~870
Yellow ~920 ~720
Orange* ~903 ~758
Red ~850 ~730
Green ~830 ~585
Blue ~790 ~664
Black ~680 ~390

*color addition this week

Overall the values are much lower, especially for green, blue, and black. Notice how much closer the yellow and red readings are this week with the three LEDs installed. In fact, their ranges were too close for me to accurately pinpoint a distinct note to play, as you can hear in the video above.

This was a fun experiment, but I discovered that Adafruit, in addition to Sparkfun, also sells a RGB Color Sensor and provides an entire tutorial on working with it for various applications, including with Processing. I appreciate the extra documentation, and I'd love to try this next.

Shout-out to fellow first-year student, Asha, who reminded me of the artist and cyborg Neil Harbisson who listens to color via a device attached to his head. I want to listen to paintings, too, Neil!