Hello, I am currently trying out the IoT Cloud. This worked wonderfully until recently, but recently I've been getting an error message that has to do with the Secret Kee and the SSID. I started all over again, but the error keeps coming back:
Compilation error: 'SECRET_SSID' was not declared in this scope
This mean that the variable 'SECRET_SSID is not declared in YOUR code, not in ioT cloud
But this is the part of the code wich i cant edit
Please show all code
I think i found the mistake. It was a problem with the wifi.h library
In file included from c:\Users\trist\Documents\Arduino\libraries\WiFiNINA\src/WiFiStorage.h:23,
from c:\Users\trist\Documents\Arduino\libraries\WiFiNINA\src/WiFi.h:38,
from c:\Users\trist\Documents\Arduino\libraries\Arduino_ConnectionHandler\src/Arduino_ConnectionHandler.h:103,
from c:\Users\trist\Documents\Arduino\libraries\ArduinoIoTCloud\src/ArduinoIoTCloud.h:27,
from C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\thingProperties.h:3,
from C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\Smarthome_Mark1_nov20a.ino:19:
c:\Users\trist\Documents\Arduino\libraries\WiFiNINA\src/utility/wifi_drv.h:293:12: error: 'PinStatus' does not name a type
static PinStatus digitalRead(uint8_t pin);
^~~~~~~~~
In file included from C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\Smarthome_Mark1_nov20a.ino:19:
C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\thingProperties.h:8:35: error: 'SECRET_SSID' was not declared in this scope
const char SSID[] = SECRET_SSID; // Network SSID (name)
^~~~~~~~~~~
C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\thingProperties.h:9:35: error: 'SECRET_OPTIONAL_PASS' was not declared in this scope
const char PASS[] = SECRET_OPTIONAL_PASS; // Network password (use for WPA, or use as key for WEP)
^~~~~~~~~~~~~~~~~~~~
C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\thingProperties.h:10:28: error: 'SECRET_DEVICE_KEY' was not declared in this scope
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
^~~~~~~~~~~~~~~~~
C:\Users\trist\AppData\Local\Arduino15\RemoteSketchbook\ArduinoCloud\114715279013744240208\Smarthome_Mark1_nov20a\thingProperties.h:10:28: note: suggested alternative: 'DEVICE_KEY'
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
^~~~~~~~~~~~~~~~~
DEVICE_KEY
exit status 1
Compilation error: 'SECRET_SSID' was not declared in this scope
Unfortunately, the error message came back
Hi, I have the same problem here, with ''SECRET_SSID' was not declared in this scope' but this only occurs when the script is pulled from the iotcloud and when compiled using Arduino 2.0.2. If the script is compiled within the cloud editor, there are no problems at all...
Yes i know but i had worket with the ide 2 bevore and it and there were no problems. In the cloud editor the compile time is much longer and i have a limet per day.
Thats the reason why i worket with the ide
same is happening to me it was working just fine before i updated the ide today
I added this since it is the file containing what the compiler is complaining about
> #include "arduino_secrets.h"
and it seems to have worked
You are a hero! It works for my code, thank you very much for your help