// read the buttons from LCD keypad shieldint read_LCD_buttons(){ adc_key_in = analogRead(0); // read the value from the sensor // my buttons when read are centered at these valies: 0, 131, 307, 481, 722 // we add approx 50 to those values and check to see if we are close // No button pressed should be 1023 if (adc_key_in > 1000) return btnNONE; // We make this the 1st option for speed reasons since it will be the most likely result if (adc_key_in < 50) return btnRIGHT; if (adc_key_in < 195) return btnUP; if (adc_key_in < 380) return btnDOWN; if (adc_key_in < 555) return btnLEFT; if (adc_key_in < 790) return btnSELECT; return btnNONE; // when all others fail, return this...

I Tried The code on arduino uno with keypad lcd but it stops compiling:Any guess to get it running?

It says:time_t does not name a type

Button:57: error: 'time_t' does not name a typeButton.ino: In function 'void setup()':Button:79: error: 'requestSync' was not declared in this scopeButton:79: error: 'setSyncProvider' was not declared in this scopeButton.ino: In function 'void loop()':Button:88: error: 'timeStatus' was not declared in this scopeButton:88: error: 'timeNotSet' was not declared in this scopeButton:91: error: 'setTime' was not declared in this scopeButton:95: error: 'timeStatus' was not declared in this scopeButton:95: error: 'timeNotSet' was not declared in this scopeButton:97: error: 'timeSet' was not declared in this scopeButton.ino: In function 'void digitalClockDisplay()':Button:124: error: 'day' was not declared in this scopeButton:126: error: 'day' was not declared in this scopeButton:129: error: 'month' was not declared in this scopeButton:131: error: 'month' was not declared in this scopeButton:133: error: 'year' was not declared in this scopeButton:136: error: 'hour' was not declared in this scopeButton:141: error: 'hour' was not declared in this scopeButton:142: error: 'minute' was not declared in this scopeButton:143: error: 'second' was not declared in this scopeButton.ino: In function 'void processSyncMessage()':Button:169: error: 'time_t' was not declared in this scopeButton:169: error: expected `;' before 'pctime'Button:173: error: 'pctime' was not declared in this scopeButton:176: error: 'pctime' was not declared in this scopeButton:176: error: 'setTime' was not declared in this scopeButton.ino: At global scope:Button:181: error: 'time_t' does not name a typeButton.ino: In function 'void setDateTime()':Button:515: error: 'setTime' was not declared in this scope

Tully

If you are interested in building your very own clock, you should also take a look at the "Doomsday Clock Shield Kit"http://samuraicircuits.com/merch/index.php?id_category=14&controller=category

It is designed to work with the "Extremely Accurate Real Time Clock". This way you can build a clock that can keep very accurate time. According to the datasheet it will lose less than one minute per year.

soskajoska

#include <LiquidCrystal.h>// include header file for time function#include <Time.h>.....

I tried, but I got the following message:

Time.ino: In function 'void digitalClockDisplay()':Time:157: error: 'setOffAlarm' was not declared in this scopeTime.ino: In function 'void button_loop()':Time:189: error: 'read_LCD_buttons' was not declared in this scopeTime:192: error: 'timedBeep' was not declared in this scopeTime.ino: In function 'void selectMenu()':Time:215: error: 'lcdClear' was not declared in this scopeTime:220: error: 'read_LCD_buttons' was not declared in this scopeTime:223: error: 'timedBeep' was not declared in this scopeTime:248: error: 'timedBeep' was not declared in this scopeTime:254: error: 'timedBeep' was not declared in this scopeTime:263: error: 'setAlarm' was not declared in this scopeTime:269: error: 'timedBeep' was not declared in this scopeTime:271: error: 'setDateTime' was not declared in this scopeTime:276: error: 'timedBeep' was not declared in this scopeTime:277: error: 'stopwatch_time_counter' was not declared in this scopeTime.ino: In function 'void clearAlarm()':Time:290: error: 'lcdClear' was not declared in this scopeTime:304: error: 'read_LCD_buttons' was not declared in this scopeTime:307: error: 'timedBeep' was not declared in this scopeTime:312: error: 'timedBeep' was not declared in this scopeTime:317: error: 'timedBeep' was not declared in this scopeTime.ino: In function 'void minuteTimer()':Time:342: error: 'getTimerMinutes' was not declared in this scopeTime:345: error: 'timedCountDown' was not declared in this scopeTime:349: error: 'timerCancelled' was not declared in this scope