
#include <LiquidCrystal.h>
#include <Keypad.h>
#include <Password.h>
#include "safetyboard.h";

void setup() {
  pinMode(airAssistPin, OUTPUT);          // sets the digital pin as output
  pinMode(ventilationPin, OUTPUT);        // sets the digital pin as output
  pinMode(waterCoolerPin, OUTPUT);        // sets the digital pin as output
  pinMode(laserEnablePin, OUTPUT);        // sets the digital pin as output
   pinMode(lichtPin, OUTPUT);             // sets the digital pin as output
  pinMode(testEnablePin, OUTPUT);         // sets the digital pin as output
  pinMode(potMeterEnable, OUTPUT);        // sets the digital pin as output 
  digitalWrite(airAssistPin, LOW);        // sets the airAssist on
  digitalWrite(ventilationPin, LOW);      // sets the air ventilation on
  digitalWrite(waterCoolerPin, LOW);      // sets the watercooler on 
  digitalWrite(laserEnablePin, LOW);      // sets the laserEnable on 
  digitalWrite(lichtPin, HIGH);           // sets the licht pin  (inverted) on 
  digitalWrite(testEnablePin, LOW);       // sets the test enable pin ()
  digitalWrite(potMeterEnable, LOW);      // sets the watercooler fans on 
  Serial.begin(9600);
  lcd.begin(16, 4);   // set up the LCD's number of columns and rows: 
  lcd.setCursor(0, 0);
  lcd.print("Bitlair lasercutter"); // Print a message to the LCD.
  lcd.setCursor(0, 1);
  lcd.print("Password?");
  lcd.setCursor(0, 2);
  lcd.print("Press * to confirm");
  kpd.addEventListener(pwdKeypadEvent); //add an event listener for this keypad
}
void loop() {
  if (passwordCorrect) {
    checkMenu();
    checkFlow();
  } else {
    kpd.getKey(); 
  }
}


