https://www.instructables.com/CoronaLam ... e-Can-Mak/
I was able to get it to compile and run and show the spin() indicating connection, and also was able to connect to the Adafruit IO server initially, but now when I try to compile and upload the code, I get the following errors. Have the whole day to troubleshoot - any suggestions on where to start?
Code: Select all
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:11:1: error: 'AdafruitIO_Feed' does not name a type
11 | AdafruitIO_Feed *lamp = io.feed("lamp");
| ^~~~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:6: error: variable or field 'handleMessage' declared void
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:20: error: 'AdafruitIO_Data' was not declared in this scope
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:37: error: 'data' was not declared in this scope; did you mean 'std::data'?
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~
| std::data
In file included from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\array:41,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\tuple:39,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\functional:54,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:225,
from C:\Users\Lenovo\AppData\Local\Temp\arduino-sketch-E810C5B6B8FB2C902B3F66CD860AACA2\sketch\CoronaLamp.ino.cpp:1:
c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\bits\range_access.h:319:5: note: 'std::data' declared here
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino: In function 'void setup()':
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:48:3: error: 'io' was not declared in this scope
48 | io.connect();
| ^~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:51:3: error: 'lamp' was not declared in this scope
51 | lamp->onMessage(handleMessage);
| ^~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:51:19: error: 'handleMessage' was not declared in this scope
51 | lamp->onMessage(handleMessage);
| ^~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:54:23: error: 'AIO_CONNECTED' was not declared in this scope
54 | while(io.status() < AIO_CONNECTED) {
| ^~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino: In function 'void loop()':
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:75:3: error: 'io' was not declared in this scope
75 | io.run();
| ^~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino: In function 'void touch()':
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:106:5: error: 'lamp' was not declared in this scope
106 | lamp->save(lampVal);
| ^~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:119:7: error: 'lamp' was not declared in this scope
119 | lamp->save(0);
| ^~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino: At global scope:
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:6: error: variable or field 'handleMessage' declared void
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:20: error: 'AdafruitIO_Data' was not declared in this scope
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~~~~~~~~~~~~
C:\Users\Lenovo\Projects\Arduino\Lamp Try 2\CoronaLamp\CoronaLamp.ino:137:37: error: 'data' was not declared in this scope; did you mean 'std::data'?
137 | void handleMessage(AdafruitIO_Data *data) {
| ^~~~
| std::data
In file included from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\array:41,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\tuple:39,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\functional:54,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\pstl\glue_algorithm_defs.h:13,
from c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\algorithm:74,
from C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\cores\esp8266/Arduino.h:225,
from C:\Users\Lenovo\AppData\Local\Temp\arduino-sketch-E810C5B6B8FB2C902B3F66CD860AACA2\sketch\CoronaLamp.ino.cpp:1:
c:\users\lenovo\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\3.0.4-gcc10.3-1757bed\xtensa-lx106-elf\include\c++\10.3.0\bits\range_access.h:319:5: note: 'std::data' declared here
319 | data(initializer_list<_Tp> __il) noexcept
| ^~~~
exit status 1
Compilation error: 'AdafruitIO_Feed' does not name a type