Hi
So my arduino keeps crashing whenever I push one button which I need to be high in order to send a message to my LCD. I cant find any problem with the button or the LCD.
Here is my code.
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int buttonPin1 = 7;
void setup() {
lcd.begin(16, 2);
lcd.print("LOADING...");
delay(2000); //displays for 2 secs
lcd.clear(); //clears display
pinMode(buttonPin1, INPUT);
digitalWrite(buttonPin1, LOW);
}
void loop() {
int buttonState1 = digitalRead(buttonPin1);
if (buttonState1 == HIGH) {
lcd.print(" WELCOME");
delay(2000); //displays for 2 secs
lcd.clear(); //clears display
}
if (buttonState1 == LOW) {
}
}