#include #include int solar, mechanical, Sw=2; LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); // initialize the lcd lcd.setBacklight(HIGH); pinMode(Sw,INPUT); } void loop() { lcd.setCursor(1,0); lcd.setCursor(12,0); lcd.print(analogRead(2)); if (mechanical == HIGH) {lcd.clear(); lcd.setCursor(0,1); lcd.print("Mechanical="); lcd.setCursor(12,1); lcd.print(analogRead(0)); } if (solar == HIGH) {lcd.clear(); lcd.setCursor(0,1); lcd.print("Solar="); lcd.setCursor(13,1); lcd.print(analogRead(2)); } delay(500); }