Chat freely about anything...

User avatar
By AdrianM
#38869 I thought I'd give this one a spin to try out the Arduino IDE (I'm not an Arduino regular and up until now I've been writing Lua on nodemcu). To begin with, I installed the Arduino IDE 1.6.7 and nodemcu board then successfully compiled some example sketches and got them blinking LEDs on nodemcu board. So far, so good then.

So now I followed the guide here and on Instructables and installed the libraries required by lightclockwifi (TimeAlarms, NTP and NeoPixelBus). However, when I compile, a vast number of errors are flagged up (far too many to list here) but the first few below:

Code: Select allArduino: 1.6.7 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

In file included from C:\Users\Adrian\Documents\Arduino\ESP8266\lightclockwifi\lightclockwifi.ino:20:0:

C:\Users\Adrian\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:71:31: error: 'timeDayOfWeek_t' does not name a type

   AlarmID_t alarmRepeat(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week

                               ^

C:\Users\Adrian\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:71:47: error: ISO C++ forbids declaration of 'DOW' with no type [-fpermissive]

   AlarmID_t alarmRepeat(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week

                                               ^

C:\Users\Adrian\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:75:29: error: 'timeDayOfWeek_t' does not name a type

   AlarmID_t alarmOnce(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week

                             ^

C:\Users\Adrian\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:75:45: error: ISO C++ forbids declaration of 'DOW' with no type [-fpermissive]

   AlarmID_t alarmOnce(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week

                                             ^

In file included from C:\Users\Adrian\Documents\Arduino\ESP8266\lightclockwifi\lightclockwifi.ino:30:0:

C:\Users\Adrian\Documents\Arduino\libraries\NTP/ntp.h:38:25: error: 'SECS_PER_HOUR' was not declared in this scope

  time_t _syncInterval = SECS_PER_HOUR;

                         ^

lightclockwifi:73: error: 'NeoPixelBus clock' redeclared as different kind of symbol

 NeoPixelBus clock = NeoPixelBus(pixelCount, clockPin);  //Clock Led on Pin 4

             ^

In file included from c:\users\adrian\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\stdlib.h:11:0,

                 from C:\Users\Adrian\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/Arduino.h:27,

                 from sketch\lightclockwifi.ino.cpp:1:

c:\users\adrian\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\time.h:44:12: error: previous declaration of 'clock_t clock()'

 clock_t    _EXFUN(clock,    (void));

            ^

...and on and on it goes. Obviously I'm making some noobish mistake, but I'm not sure what? At first I fell into the trap of installing libraries from GitHub as Zip files ending in '-master'. I since renamed them to match the name of the .ino & .h files but the errors seem to be due to something different.
User avatar
By Chris Carter
#38906 Looks like you may not have got all the libraries? There are more than just the ones I have on github.

Also, A lot of people are reporting problems when using IDE 1.6.6, I've not heard of anyone testing 1.6.7, but maybe roll-back to 1.6.5 and test that.
User avatar
By AdrianM
#38973
Chris Carter wrote:Looks like you may not have got all the libraries? There are more than just the ones I have on github.

Also, A lot of people are reporting problems when using IDE 1.6.6, I've not heard of anyone testing 1.6.7, but maybe roll-back to 1.6.5 and test that.

Puzzling, I just set up a fresh 1.6.5 on another computer, installed the three additional libraries I think are needed: TimeAlarms, NTP and NeoPixelBus. These three are the only ones flagged as missing when attempting to compile with the just files in your lightclockwifiv2 project folder, yet it still throws a ton of compilation errors.

Code: Select allArduino: 1.6.5 (Windows 8.1), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"

In file included from lightclockwifi.ino:20:0:
C:\Users\adria_000\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:71:31: error: 'timeDayOfWeek_t' does not name a type
   AlarmID_t alarmRepeat(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week
                               ^
C:\Users\adria_000\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:71:47: error: ISO C++ forbids declaration of 'DOW' with no type [-fpermissive]
   AlarmID_t alarmRepeat(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week
                                               ^
C:\Users\adria_000\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:75:29: error: 'timeDayOfWeek_t' does not name a type
   AlarmID_t alarmOnce(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week
                             ^
C:\Users\adria_000\Documents\Arduino\libraries\TimeAlarms/TimeAlarms.h:75:45: error: ISO C++ forbids declaration of 'DOW' with no type [-fpermissive]
   AlarmID_t alarmOnce(const timeDayOfWeek_t DOW, const int H,  const int M,  const int S, OnTick_t onTickHandler); // as above, with day of week
                                             ^
In file included from lightclockwifi.ino:30:0:
C:\Users\adria_000\Documents\Arduino\libraries\NTP/ntp.h:38:25: error: 'SECS_PER_HOUR' was not declared in this scope
  time_t _syncInterval = SECS_PER_HOUR;
                         ^
lightclockwifi:73: error: 'NeoPixelBus clock' redeclared as different kind of symbol
In file included from c:\users\adria_000\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\time.h:10:0,
                 from lightclockwifi.ino:19:
c:\users\adria_000\appdata\roaming\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\time.h:44:12: error: previous declaration of 'clock_t clock()'
 clock_t    _EXFUN(clock,    (void));
            ^
lightclockwifi.ino: In function 'void setup()':
lightclockwifi:139: error: request for member 'Begin' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:150: error: 'adjustTime' was not declared in this scope
lightclockwifi:158: error: 'SECS_PER_HOUR' was not declared in this scope
lightclockwifi:158: error: 'setSyncInterval' was not declared in this scope
lightclockwifi:159: error: 'setSyncProvider' was not declared in this scope
lightclockwifi:167: error: 'second' was not declared in this scope
lightclockwifi.ino: In function 'void loop()':
lightclockwifi:190: error: 'second' was not declared in this scope
lightclockwifi:191: error: 'hour' was not declared in this scope
lightclockwifi:191: error: 'minute' was not declared in this scope
lightclockwifi:194: error: 'hour' was not declared in this scope
lightclockwifi:194: error: 'minute' was not declared in this scope
lightclockwifi:201: error: 'hour' was not declared in this scope
lightclockwifi.ino: In function 'void initWiFi()':
lightclockwifi:397: error: request for member 'Show' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void handleRoot()':
lightclockwifi:918: error: 'hour' was not declared in this scope
lightclockwifi:919: error: 'minute' was not declared in this scope
lightclockwifi:935: error: 'adjustTime' was not declared in this scope
lightclockwifi:945: error: 'adjustTime' was not declared in this scope
lightclockwifi.ino: In function 'void nightCheck()':
lightclockwifi:1041: error: 'hour' was not declared in this scope
lightclockwifi:1041: error: 'minute' was not declared in this scope
lightclockwifi.ino: In function 'void updateface()':
lightclockwifi:1203: error: 'hour' was not declared in this scope
lightclockwifi:1203: error: 'minute' was not declared in this scope
lightclockwifi:1209: error: 'second' was not declared in this scope
lightclockwifi:1240: error: 'second' was not declared in this scope
lightclockwifi:1246: error: request for member 'Show' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void face(uint16_t, uint16_t)':
lightclockwifi:1284: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1289: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1291: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1292: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void nightface(uint16_t, uint16_t)':
lightclockwifi:1297: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1299: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1300: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void alarmface()':
lightclockwifi:1307: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1310: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void flashface()':
lightclockwifi:1336: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1340: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void invertLED(int)':
lightclockwifi:1352: error: request for member 'GetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1352: error: request for member 'GetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1354: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void darkenToMidday(uint16_t, uint16_t)':
lightclockwifi:1388: error: request for member 'GetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1390: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void logo()':
lightclockwifi:1421: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1426: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1431: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1436: error: request for member 'SetPixelColor' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi:1439: error: request for member 'Show' in 'clock', which is of non-class type 'clock_t() {aka long unsigned int()}'
lightclockwifi.ino: In function 'void webHandleNightModeDemo()':
lightclockwifi:1544: error: 'setTime' was not declared in this scope
lightclockwifi.ino: In function 'void webHandleTimeSet()':
lightclockwifi:1556: error: 'setTime' was not declared in this scope
lightclockwifi:1558: error: 'hour' was not declared in this scope
lightclockwifi:1558: error: 'minute' was not declared in this scope
lightclockwifi.ino: In function 'void readDSTtime()':
lightclockwifi:1677: error: 'adjustTime' was not declared in this scope
'NeoPixelBus clock' redeclared as different kind of symbol

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

To begin with the errors are coming from the TimeAlarms and NTP libs themselves so it's not like they aren't there. I can't understand what's going on.