Build Sheets

01 · Brief

Behind the panel from the first game sits the ship’s authentication console. Three toggle switches carry markings only visible under the UV light the players are carrying. Set the switches right and the LCD wakes up and asks for a password.

The password is the code the alien artifacts gave up. Enter it on the keypad and the LED turns green, the relay fires, and the maglock drops, releasing a box of contents for the next game.

The Mega runs the whole console on its own. Toggle state, keypad input, the display, and the relay all live on one board with no link to the Pi.

02 · System

9 V RAIL12 V PSURELAYMAGLOCK→ MEGA
MEGATOGGLES ×3KEYPADLCD→ RELAY

03 · Source

Escape_Game_MegaKeypad.ino

void loop() {

if (digitalRead(triggerSwitchA) == LOW && digitalRead(triggerSwitchC) == LOW && digitalRead(triggerSwitchB) == HIGH) {
  systemOn = true;
    if (systemOn == true){
    //lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Input Code:");
    digitalWrite(redLED, HIGH);

    customKey = myKeypad.getKey();
    
    if (customKey){
      
      Data[data_count] = customKey; 
      lcd.setCursor(data_count,1); 
      lcd.print(Data[data_count]); 
      Serial.print(Data[data_count]);
      data_count++; 
      delay(50);
    }

      if(data_count == Password_Length-1){
        lcd.clear();
        delay(500);

            if(!strcmp(Data, Master) && relayOn == false){
          lcd.setCursor(0,0);
          lcd.print("Accepted");
          Serial.println("puzzle 2 solved");
          digitalWrite(relay, HIGH); // Turn the relay on
          Serial.println("relay on");
          delay(200); // Wait
          digitalWrite(relay, LOW); // Turn the relay Off
          Serial.println("relay off");
          relayOn = true;
          }
      
        else {         
          lcd.print("Thinking");   
          delay(1000);
          lcd.clear();
          clearData();
        }      
      }
    }
  } else {
    systemOn = false;
    relayOn = false;
    lcd.clear();
    digitalWrite(redLED, LOW);
  }
}
Lines 79–131 of 131 · Full source →

04 · Lessons

This game led to the first "jump scare" which was fun to watch, maglocks don't release gently.