#include <LiquidCrystal_I2C.h>
#define pad1 13
#define pad2 12
#define pad3 14
#define pad4 27
#define pad5 26
#define pad6 25
#define pad7 33
#define pad8 32
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x3F for a 16 chars and 2 line display
void setup() {
lcd.init();
lcd.clear();
lcd.backlight(); // Make sure backlight is on
// Print a message on both lines of the LCD.
lcd.setCursor(3,0); //Set cursor to character 2 on line 0
lcd.print("ESP-OCTAPAD-V1");
lcd.setCursor(1,1); //Move cursor to character 2 on line 1
lcd.print("Connecting Pads to");
lcd.setCursor(2,2);
lcd.print("espoct.midi/init");
lcd.setCursor(0,3);
lcd.print("Connecting to server");
pinMode(pad1, INPUT);
pinMode(pad2, INPUT);
pinMode(pad3, INPUT);
pinMode(pad4, INPUT);
pinMode(pad5, INPUT);
pinMode(pad6, INPUT);
pinMode(pad7, INPUT);
pinMode(pad8, INPUT);
delay(3000);
}
#define pad1status LOW;
#define pad2status LOW;
#define pad3status LOW;
#define pad4status LOW;
#define pad5status LOW;
#define pad6status LOW;
#define pad7status LOW;
#define pad8status LOW;
#define lcdText = "";
void loop() {
lcd.clear();
pad1status = digitalRead(pad1);
if(pad1status == HIGH){
lcd.setCursor(0,0);
lcd.print("pad1");
if(lcdText == "pad1"){
break;
}
else{
lcdText = "pad1";
}
}
if(pad1status == LOW){
lcd.clear();
lcdText = "";
}
}