#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int button1 = 6;
int button2 = 7;
int button3 = 8;
int led1 = 13;
void setup()
{
lcd.begin(16, 2);
lcd.print("Welcome");
pinMode(button1,INPUT);
pinMode(button2,INPUT);
pinMode(button3,INPUT);
pinMode(led1,OUTPUT);
}
void loop()
{
if (digitalRead(button1) == HIGH) (
lcd.print("INVALID CHOICE!");
delay(5000);
clear()
if (digitalRead(button2) == HIGH) (
lcd.print("INVALID CHOICE!");
delay(5000);
clear();
if (digitalRead(button3) == HIGH) (
lcd.print("VALID CHOICE!");
digitalWrite(led1, HIGH);
delay(5000);
clear();
digitalWrite(led1,LOW);
}
I checked and I think i set up the LCD properly, but it said no, can anyone point out the error of my ways.