New Years Light
Throwing a New Year's Eve party is never complete without lights. For this puzzle your help is needed to turn on the purple LED. After setting up the Arduino there is a question to answer, then the party can begin! You will need:
Arduino Code
To complete this puzzle, you will use the attached code which demonstrates the Serial parseInt() function. The code looks for an ASCII string of comma-separated values. It parses them into ints, and uses those to fade an RGB LED. The color purple will appear because of the values of RGB.
The LED has these values in code:
const int redPin = 3;
const int greenPin = 5;
const int bluePin = 6;
Downloads
Hardware Setup
- Connect common cathode RGB LED to breadboard; place it in J5-J8. This is the part that will light up.
- Add the first resistor on the breadboard at F5 and D5 to limit the flow of electric current.
- Add a second resistor on the breadboard at F7 and D7 and add the third resistor on the breadboard at F8 and D8. These resistors limit the flow of electric current to the LED so it isn't too bright that it breaks.
- Use a wire to connect F6 on breadboard to GND (digital pin side) on Arduino to hold the voltage of the case at ground potential.
- Use another wire to connect A5 to digital pin 3 to make the red value work.
- Use another wire for the blue pin, connect the wire to A7 and digital pin 6 on the Arduino.
- Use a final wire to connect A8 to digital pin 5 on the Arduino. This is for the green value.