I want to learn to make the countdown time and set the time using the four buttons. "Up, down, select, go back" and 20X4 LCD screen,
My question is what I did the first step to creating a set time?
#include <LiquidCrystal.h>
LiquidCrystal lcd(7,6,5,4,3,2);
int pin = A0;
int val =0;
void setup(){
Serial.begin(9600);
lcd.begin(20,4);
}
void loop(){
}
char ReadKeypad()
{
val = analogRead(pin);
Serial.println(val);
if(val >689 && val < 700)
return 'U';
else if(val >839 && val < 850)
return 'D';
else if(val >450 && val < 500)
return 'B';
else if(val >550 && val < 560)
return 'S';
}
fine. now start using ReadKeypad() and do things based on th retuen value
side note: ReadKeypad should probably return 'none' if and as required; your logic is apparently incomplete
wg0z:
fine. now start using ReadKeypad() and do things based on th retuen value
side note: ReadKeypad should probably return 'none' if and as required; your logic is apparently incomplete