Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Atiriya Iyer
- //LCD and Button
- #include <LiquidCrystal.h>
- LiquidCrystal lcd (4,5,15, 16, 17, 18);
- const int pinButton= 2;
- boolean buttPress=0;
- const int pinPot= A5;
- void setup()
- {
- // put your setup code here, to run once:
- lcd.begin (16,2);
- Serial.begin(9600);
- pinMode (pinButton, INPUT);
- pinMode (pinPot, INPUT);
- lcd.clear();
- }
- void loop()
- {
- buttPress= digitalRead(pinButton);
- Serial.print (buttPress);
- buttPress= digitalRead(pinButton);
- lcd.clear();
- if (buttPress== 1)
- lcd.print ("hello");
- delay(1000);
- lcd.clear();
- buttPress= digitalRead(pinButton);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement