#include <LiquidCrystal_I2C.h>
#include <ezButton.h>
#define OPTION_A_PIN 25
#define OPTION_B_PIN 26
ezButton yellowButton(25);
ezButton greenButton(26);
// Setup the LCD
LiquidCrystal_I2C lcd1(0x27, 20, 4);
LiquidCrystal_I2C lcd2(0x26, 20, 4);
int correctAnswerCount = 0;
int incorrectAnswerCount = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
lcd1.init();
lcd1.backlight();
lcd2.init();
lcd2.backlight();
// Set pinMode to INPUT_PULLUP
yellowButton.setDebounceTime(25);
greenButton.setDebounceTime(25);
lcd1.print("Start voting..");
lcd1.setCursor(0, 1);
lcd1.print("A-Green B-Yellow");
lcd2.print("Cool");
}
void loop() {
greenButton.loop();
yellowButton.loop();
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}