Thanks sir for reply ![]()
I used loop at end bcoz i want to run code once only not in loop. I updated my circuit as per img ref below
Updated code
#include <LiquidCrystal.h>
const int buttonPin = 7;
int buttonState = 0;
void setup()
{
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Hello All");
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
if (buttonState == HIGH)
// Print a message to the LCD.
lcd.print("Jon");
}
void loop()
{
}
but still its not working only showing "Hello All "