Introduction: 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:

Step 1: 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;

Step 2: Hardware Setup

  1. Connect common cathode RGB LED to breadboard; place it in J5-J8. This is the part that will light up.
  2. Add the first resistor on the breadboard at F5 and D5 to limit the flow of electric current.
  3. 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.
  4. 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.
  5. Use another wire to connect A5 to digital pin 3 to make the red value work.
  6. Use another wire for the blue pin, connect the wire to A7 and digital pin 6 on the Arduino.
  7. Use a final wire to connect A8 to digital pin 5 on the Arduino. This is for the green value.


Step 3: How to Play

Tinkercad Lights

In order to turn on the light, you will need to use the serial monitor on Tinkercad and input the right answer.

"What is the number of the resistors multiplied by the resistance?"

Use the Tinkercard simulation below to light up the party purple!

https://www.tinkercad.com/things/4qRdMNlcGmc

Hour of Code Speed Challenge

Participated in the
Hour of Code Speed Challenge