// Define LED Pins
const int x1_RedLed_Pin = 23;
const int x1_OrangeLed_Pin = 22;
const int x1_GreenLed_Pin = 21;
const int y1_RedLed_Pin = 2;
const int y1_OrangeLed_Pin = 4;
const int y1_GreenLed_Pin = 15;
const int blueLed_Pin = 5;
/*
*/
// Define Buttons
const int button01_Pin = 19;
const int button02_Pin = 18;
// Define button bool states
bool error_Button_State = HIGH;
bool timeScale_Button_State = HIGH;
bool error_Button_State_Before = HIGH;
bool timeScale_Button_State_Before = HIGH;
void setup() {
Serial.begin(115200);
pinMode(x1_RedLed_Pin, OUTPUT);
pinMode(x1_OrangeLed_Pin, OUTPUT);
pinMode(x1_GreenLed_Pin, OUTPUT);
pinMode(y1_RedLed_Pin, OUTPUT);
pinMode(y1_OrangeLed_Pin, OUTPUT);
pinMode(y1_GreenLed_Pin, OUTPUT);
pinMode(blueLed_Pin, OUTPUT);
// Add Buttons
pinMode(button01_Pin, INPUT_PULLUP);
pinMode(button02_Pin, INPUT_PULLUP);
}
void loop() {
digitalWrite(x1_RedLed_Pin, !digitalRead(button01_Pin));
digitalWrite(x1_OrangeLed_Pin, !digitalRead(button01_Pin));
digitalWrite(x1_GreenLed_Pin, !digitalRead(button01_Pin));
digitalWrite(y1_RedLed_Pin, !digitalRead(button02_Pin));
digitalWrite(y1_OrangeLed_Pin, !digitalRead(button02_Pin));
digitalWrite(y1_GreenLed_Pin, !digitalRead(button02_Pin));
if (digitalRead(button01_Pin) == LOW && digitalRead(button02_Pin) == LOW) {
digitalWrite(blueLed_Pin, HIGH);
} else {
digitalWrite(blueLed_Pin, LOW);
}
}