Final Escape Room Project

by paebersol in Circuits > Arduino

204 Views, 2 Favorites, 0 Comments

Final Escape Room Project

Holiday.png

For this escape room, the participant will be completing a word search that starts out as Thanksgiving themed and transitions to Christmas. After completing the holiday transition, it will be time for them to put their Christmas lights up. They must construct the Arduino Uno in order to begin their Christmas celebration.

Arduino Code

int buttonState = 0;




void setup()

{

 pinMode(12, INPUT); //push button 

 pinMode(13, OUTPUT); //red LED

 pinMode(2, OUTPUT); //green LED

}


void loop()

{

 // read the state of the pushbutton

 buttonState = digitalRead(12);

 // check if pushbutton is pressed. if it is, the

 // button state is HIGH

 if (buttonState == HIGH) {

  digitalWrite(13, HIGH); //13=red light and "high"=on

  digitalWrite(2, LOW); //2=green light and "low"=off

  delay(500); //Pause whle the lights switch

  digitalWrite(13, LOW);//red light is off

  digitalWrite(2, HIGH); //green light is on

  delay(500); //pause while the lights switch 

  digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

    digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   digitalWrite(13, HIGH);

  digitalWrite(2, LOW);

  delay(500);

  digitalWrite(13, LOW);

  digitalWrite(2, HIGH);

  delay(500);

   

 } else {

  digitalWrite(13, LOW); //If the push button isn't pressed, red is off

  digitalWrite(2, LOW); //If the push button isn't pressed, green is off

 }

 delay(10); // Delay a little bit to improve simulation performance

}

Downloads

Hardware Set Up

FinalProject.png
  1. Connect either the red or green LED to J1 and J3.
  2. Connect the other colored LED to J16 and J17.
  3. Connect a push button to E3, F3, E5, and F5.
  4. Connect one 220 ohm resistor to D1 and F1.
  5. Connect the other 220 ohm resistor to D16 and F16.
  6. Connect the 1K ohm resistor to C5 and C9.
  7. Use a wire to connect I3 on the breadboard to digital pin 5V on the Arduino.
  8. Use a wire to connect A1 on the breadboard to GND on the Arduino.
  9. Use a wire to connect F2 on the breadboard to digital pin 13 on the Arduino.
  10. Use a wire to connect D5 on the breadboard to digital pin 12 on the Arduino.
  11. Use a wire to connect A9 on the breadboard to GND on the Arduino.
  12. Use a wire to connect B9 on the breadboard to B16 on the breadboard.
  13. Use a wire to connect F17 on the breadboard to digital pin 2 on the Arduino.

How to Play

The player must complete the holiday word search attached below. Once completed, the player will be given the instructions needed to set up their Christmas lights and enjoy!

Link for Tinkercad: https://www.tinkercad.com/things/04b3CTgiJtA-final-project/editel

Downloads