Pages: [1]   Go Down
Author Topic: Keypad, RTC, 2x16 LCD and xbee  (Read 462 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear All,

               I had a Arduino Mega board connected to a 4x4 keypad a RTC, 2x16 LCD and a xbee. The LCD will display the current time and the program will still detect the keypad press. When '1' is pressed, a serial string will be send out from the xbee to control something.

               I saw from the RTC sketch that to display the time, we will delay(1000); so that the time in the LCD will update every seconds. But by putting the delay(1000); my keypad pressed may not respond and nothing will be send out as the program may be in the delay function doing nothing. As I am using the keypad scanning method in the forum and the time display also in the forum, I had a problem with putting both together.

              Can someone help me as to what should I do to get rid of the delay(1000) and yet can use the loop to scan keypad and still display the time on the LCD every seconds.

              Thanks a lot
Logged

Pakistan
Offline Offline
Sr. Member
****
Karma: 6
Posts: 356
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

See Blink without Delay example in Arduino IDE. This is only cure to your problem.
Logged


Pages: [1]   Go Up
Jump to: