Week 3: Bouncing LEDs [LAB]
Sept 26, 2018
This week's lab of creating a simple application using digital / analog input and digital output, the inspiration started from wanting to creating something that mimicked the "ping-pong"-ing nature of a conversation / interaction between people. I wanted to create a physical visualization of the metaphor of one person's words bouncing off / ping-ponging to another person, then to another, then to another and so on. While working on this, I also realized that I was creating a sort of physical "bouncing ball". Hence I decided to call this physical device "Bouncing LEDs".
- 220Ω resistor * 5
- 10kΩ resistor * 5
- Yellow LED * 5
- Photo resistor (GM5539) * 5 (bought from here)
- Button Switch * 5
- Fabric tape
One thing that I would have liked to do, is to create buttons that don't have to live on the breadboard so that people could physically hold the button to provide a more direct correlation to the metaphor that I was inspired to create this physical device. However, there was enough "spaghetti" situation happening for the day and I wanted to focus more on perfecting the other aspects of the device.
Stuff I learned:
- I used almost all of the available digital pins on my Arduino for this. Had I had another pair of LED - photo resistor, I would have run out of pins. Next time, as per Danny's suggestion, will look in to multiplexing or use another microcontroller that has more pins.
- There are two different types of "light sensors": photo resistors and photo transistors. I used photo resistors for this because that was what I immediately thought was the sensor that I needed. Next time for light detection, will try photo transistors.
- Wiring up multiple sets of the same components is as time consuming and difficult as I remembered. I tried to make sure to test out each part of the tape-connected circuits one by one during the fabrication process.
- Setting up the appropriate amount of threshold to detect the light as "on", and not detect the adjacent light "on", was a process of seeing the numbers printed on the serial monitor and fine-tuning. However, I also realized that the overall amount of light in the room was also a VERY important factor.
Stuff I'm still not sure of:
- I wonder whether connecting the button switches to digital input pins was necessary. I am very inclined to say that it would have created the same effect if the switches were directly connected to the LEDs themselves. The reason why I didn't do so was because the circuits had already grown too messy and I thought it was simpler on the circuitry side to connect the switches to the digital pins and turn the corresponding LEDs on (HIGH) using code.
Arduino Source Code: