On October 29th, we worked on using RGB LEDS in conjunction with the Ultrasonic Sensor!
An RGB led is a three-color LED. It is essentially three separate LED (a red, green, and blue LED) all crammed into one housing. That is why the LED in the diagram above has four legs. Three of them are used to control the three individual LEDs. Pin 6 controls the blue LED, pin 7 controls the green LED, and pin 8 controls the red LED. The fourth leg is the ground leg.
We wrote code to control the flashing of the RGB led between the three different colors based on the distance from our hand to the ultrasonic sensor (not pictured). Almost everyone had success, which was awesome! Thanks to Mr. Mander and his shipment of Ultrasonic Sensors, we had plenty for everyone to use.
An RGB led is a three-color LED. It is essentially three separate LED (a red, green, and blue LED) all crammed into one housing. That is why the LED in the diagram above has four legs. Three of them are used to control the three individual LEDs. Pin 6 controls the blue LED, pin 7 controls the green LED, and pin 8 controls the red LED. The fourth leg is the ground leg.
We wrote code to control the flashing of the RGB led between the three different colors based on the distance from our hand to the ultrasonic sensor (not pictured). Almost everyone had success, which was awesome! Thanks to Mr. Mander and his shipment of Ultrasonic Sensors, we had plenty for everyone to use.