-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing code? #1
Comments
A number of these were solved by downloading the Time library and adding an #include <TimeLib.h>. But some of the functions missing a declaration in the header file seemed to still be a problem. |
Code worked perfectly fine for me. Thank you, this is brilliant. Only thing extra I had to add was an include for TimeLib.h which is referenced by the new Time.h |
Similar issue in ntp.ino |
Did anyone else besides megachips get this to work? I'm getting all the same errors as arpuss. I'm using arduino ide 1.6.11. |
You need to download the Time library: |
When I try to build this project, I get a lot of messages about undefined stuff:
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void handleRoot()':
esp8266-ledclock:32: error: 'hour' was not declared in this scope
s.replace("@@hour@@", String(hour()));
esp8266-ledclock:33: error: 'minute' was not declared in this scope
s.replace("@@min@@", String(minute()));
esp8266-ledclock:36: error: 'timeStatus' was not declared in this scope
s.replace("@@SYNCSTATUS@@", timeStatus() == timeSet ? "OK" : "Overdue");
esp8266-ledclock:36: error: 'timeSet' was not declared in this scope
s.replace("@@SYNCSTATUS@@", timeStatus() == timeSet ? "OK" : "Overdue");
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void handleForm()':
esp8266-ledclock:59: error: 'getNtpTime' was not declared in this scope
time_t newTime = getNtpTime();
esp8266-ledclock:61: error: 'setTime' was not declared in this scope
esp8266-ledclock:77: error: 'setupWiFi' was not declared in this scope
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void setup()':
esp8266-ledclock:82: error: 'setupDisplay' was not declared in this scope
setupDisplay();
esp8266-ledclock:85: error: 'setupWiFi' was not declared in this scope
setupWiFi();
esp8266-ledclock:86: error: 'setupTime' was not declared in this scope
setupTime();
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void loop()':
esp8266-ledclock:94: error: 'displayIP' was not declared in this scope
if (displayIP()) return;
esp8266-ledclock:96: error: 'timeStatus' was not declared in this scope
esp8266-ledclock:96: error: 'timeNotSet' was not declared in this scope
esp8266-ledclock:97: error: 'now' was not declared in this scope
esp8266-ledclock:99: error: 'displayClock' was not declared in this scope
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void setupWiFi()':
esp8266-ledclock:108: error: 'displayBusy' was not declared in this scope
displayBusy(0);
esp8266-ledclock:111: error: 'stopDisplayBusy' was not declared in this scope
esp8266-ledclock:112: error: 'setupAP' was not declared in this scope
esp8266-ledclock:112: error: return-statement with a value, in function returning 'void' [-fpermissive]
esp8266-ledclock:116: error: 'stopDisplayBusy' was not declared in this scope
stopDisplayBusy();
esp8266-ledclock:117: error: 'setupSTA' was not declared in this scope
setupSTA();
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void setupSTA()':
esp8266-ledclock:126: error: 'displayBusy' was not declared in this scope
displayBusy(1);
esp8266-ledclock:141: error: 'stopDisplayBusy' was not declared in this scope
stopDisplayBusy();
esp8266-ledclock:142: error: 'displayDash' was not declared in this scope
displayDash();
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\esp8266-ledclock.ino: In function 'void setupAP()':
esp8266-ledclock:149: error: 'displayAP' was not declared in this scope
displayAP();
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\display.ino: In function 'void displayBusy(char)':
display:103: error: '_displayBusy' was not declared in this scope
ticker.attach(0.1, _displayBusy);
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\display.ino: In function 'char displayIP()':
display:130: error: '_displayIP' was not declared in this scope
ticker.attach(1.0, _displayIP);
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\display.ino: In function 'void _displayIP()':
display:138: error: 'displayClock' was not declared in this scope
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\display.ino: In function 'void displayClock()':
display:157: error: 'hour' was not declared in this scope
int h = hour();
display:158: error: 'minute' was not declared in this scope
int m = minute();
display:173: error: 'second' was not declared in this scope
if (second() & 0x1) decimals = 0x4;
display:174: error: 'timeStatus' was not declared in this scope
if (timeStatus() != timeSet) decimals |= 0x1;
display:174: error: 'timeSet' was not declared in this scope
if (timeStatus() != timeSet) decimals |= 0x1;
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\ntp.ino: In function 'void setupTime()':
ntp:13: error: 'getNtpTime' was not declared in this scope
setSyncProvider(getNtpTime);
ntp:13: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(getNtpTime);
ntp:14: error: 'setSyncInterval' was not declared in this scope
setSyncInterval(settings.interval);
C:\Users\Alexander\Documents\Arduino\esp8266-ledclock\ntp.ino: In function 'time_t getNtpTime()':
ntp:23: error: 'sendNTPpacket' was not declared in this scope
ntp:33: error: 'SECS_PER_HOUR' was not declared in this scope
exit status 1
'hour' was not declared in this scope
The text was updated successfully, but these errors were encountered: