#include <LiquidCrystal.h>
#include <Wire.h>
#include <RTClib.h>
#include <EEPROM.h>
RTC_DS3231 rtc;
const int rs = 12, en = 11, d4 = 6, d5 = 5, d6 = 4, d7 = 3;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
const int buttonPin1 = A0;
const int buttonPin2 = 9;
const int buttonPin3 = 8;
const int buttonPin4 = 7;
int bS1, bS2, bS3, bS4;
void setup() {
Serial.begin(9600);
pinMode(buttonPin1, INPUT_PULLUP);
pinMode(buttonPin2, INPUT_PULLUP);
pinMode(buttonPin3, INPUT_PULLUP);
pinMode(buttonPin4, INPUT_PULLUP);
lcd.begin(16, 2);
lcd.print("Testing Buttons");
}
void loop() {
bS1 = digitalRead(buttonPin1);
bS2 = digitalRead(buttonPin2);
bS3 = digitalRead(buttonPin3);
bS4 = digitalRead(buttonPin4);
if (bS1 == LOW) {
Serial.println("Button 1 pressed");
}
if (bS2 == LOW) {
Serial.println("Button 2 pressed");
}
if (bS3 == LOW) {
Serial.println("Button 3 pressed");
}
if (bS4 == LOW) {
Serial.println("Button 4 pressed");
}
delay(500);
}