When thinking about our long-term furniture project, we knew we wanted our piece of furniture to recognize and react to a person walking up to it. In order to build up our expertise, we used an ultrasonic sensor to detect and switch from a green LED to a red when it sensed you were at a certain distance (in this case, ten centimeters).
We used a tutorial to achieve this, found here: https://www.instructables.com/id/Simple-Arduino-and-HC-SR04-Example/
At first, we didn’t see the need to hook up the GND and VCC wires to the positive and negative points on the breadboard—we immediately put them into the 5V and GND spots on the arduino. While this technically still allowed the ultrasonic sensor to do its thing, it cut the red and green LEDs out of the circuit. By following the diagram, it allowed our sensor to tell us if it thought we were getting a little too close for comfort:
Our next step was to incorporate the RGB LED light in our experiment.
No comments:
Post a Comment