// include the library code: #include const int numRows = 2; const int numCols = 16; const int lcdBackLightPin = 12; const int upButtonPin = 6; const int downButtonPin = 5; const int setButtonPin = 4; const int resetButtonPin = 3; // initialize the library with the numbers of the interface pins LiquidCrystal lcd(13, 11, 10, 9, 8, 7); void setup() { // set up the LCD's number of rows and columns: lcd.begin(numRows, numCols); lcd.clear(); lcd.setCursor(5, 1); lcd.print("XistiX"); digitalWrite(lcdBackLightPin, HIGH); pinMode(lcdBackLightPin, OUTPUT); pinMode(upButtonPin, INPUT); pinMode(downButtonPin, INPUT); pinMode(setButtonPin, INPUT); pinMode(resetButtonPin, INPUT); } void loop() { if(digitalRead(upButtonPin)) { lcd.setCursor(0, 0); lcd.print("UP Button"); } else if(digitalRead(downButtonPin)) { lcd.setCursor(0, 0); lcd.print("DOWN Button"); } else if(digitalRead(setButtonPin)) { lcd.setCursor(0, 0); lcd.print("SET Button"); } else if(digitalRead(resetButtonPin)) { lcd.setCursor(0, 0); lcd.print("RESET Button"); } else { lcd.setCursor(0, 0); lcd.print(" "); } }