hi I'm new the cloud and I've been trying to get my nano 33 iot working with the cloud I've gone through all the steps witch includes installing the arduino agent and configuring the device and the current status is online but when I try to upload my code to the arduino trough usb it gives an error message. if I use the full editor it uploads but using the cloud editor the error pops up. I've tried to build a dashboard with a switch widget and linked it to a variable for switching a simple led after uploading with full editor but its seems like the arduino is not connected to the cloud even after it successfully uploaded with full editor.
here's my code:
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled 2"
https://create.arduino.cc/cloud/things/ecdde80b-480a-409a-8db0-19ccd690dd54
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
bool led1;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
int ledPin=8;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
pinMode(ledPin,OUTPUT);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
//Serial.println("hello world");
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
}
void loop() {
ArduinoCloud.update();
// Your code here
Serial.println(led1);
}
void onLed1Change() {
// Do something
if (led1){
digitalWrite(ledPin,HIGH);
}
else{
digitalWrite(ledPin,LOW);
}
}
and here's the error message:
Start verifying
In file included from /tmp/199022313/temperature_aug22a/temperature_aug22a.ino:1:0:
/tmp/199022313/temperature_aug22a/arduino_secrets.h:2:21: error: missing terminating " character
#define SECRET_PASS "wifiPassword"
^
/tmp/199022313/temperature_aug22a/thingProperties.h:10:25: note: in expansion of macro 'SECRET_PASS'
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
^~~~~~~~~~~
In file included from /tmp/199022313/temperature_aug22a/temperature_aug22a.ino:17:0:
/tmp/199022313/temperature_aug22a/thingProperties.h:10:36: error: expected primary-expression before ';' token
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
^
exit status 1
In file included from /tmp/199022313/temperature_aug22a/temperature_aug22a.ino:1:0:
/tmp/199022313/temperature_aug22a/arduino_secrets.h:2:21: error: missing terminating " character
#define SECRET_PASS "wifPassword"
^
/tmp/199022313/temperature_aug22a/thingProperties.h:10:25: note: in expansion of macro 'SECRET_PASS'
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
^~~~~~~~~~~
In file included from /tmp/199022313/temperature_aug22a/temperature_aug22a.ino:17:0:
/tmp/199022313/temperature_aug22a/thingProperties.h:10:36: error: expected primary-expression before ';' token
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
^
exit status 1