#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
const int sw1 = 6;
const int sw2 = 5;
const int sw3 = 4;
const int sw4 = 3;
void setup() {
pinMode( sw1, INPUT);
pinMode( sw2, INPUT);
pinMode( sw3, INPUT);
pinMode( sw4, INPUT);
lcd.begin(16, 2);
// you can now interact with the LCD, e.g.:
lcd.setCursor(0,0);
lcd.print("WELCOME TO");
lcd.setCursor(0,1);
lcd.print("SUPER MARKET");
delay(3000);
lcd.clear();
lcd.print("Please Add Items");
delay(3000);
lcd.clear();
}
void loop() {
int value ;
value = digitalRead(sw1);
if(value == HIGH)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Milk Products");
delay(1000);
}
int a;
a = digitalRead(sw2);
if(a == HIGH)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Butter Added");
delay(1000);
lcd.setCursor(0,1);
lcd.print("Price = 20Rs");
delay(1000);
}
int b;
b = digitalRead(sw3);
if(b==HIGH)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Panneer Added");
delay(1000);
lcd.setCursor(0,1);
lcd.print("Price = 20Rs");
delay(1000);
}
int c;
c = digitalRead(sw4);
if(c==HIGH)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("THANK YOU");
delay(1000);
}
}