Hi i've been trying to use the Arduino loT cloud and the sketch that you have to start with to get the arduino loT cloud started won't work. It returns these errors and this is the sketch:
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/34e733c9-8f26-4421-8678-c07fcd855920
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
- No variables have been created, add cloud variables on the Thing Setup page
to see them declared here
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"
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// 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
}
/*
Since OnOff is READ_WRITE variable, onOnOffChange() is
executed every time a new value is received from IoT Cloud.
*/
This is the second sketch:
// Code generated by Arduino IoT Cloud, DO NOT EDIT.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
void initProperties(){
}
Here are the last errors
/usr/local/bin/arduino-cli compile --fqbn arduino:avr:ethernet --build-cache-path /tmp --output-dir /tmp/2938109266/build --build-path /tmp/arduino-build-22427CDC28F732843B1EAB1C58D815EE --library /mnt/create-efs/webide/f7/cf/f7cf2c9d73ce35efab2bf2d6ac490142:zm476/libraries_v2/DS1307RTC --library /mnt/create-efs/webide/f7/cf/f7cf2c9d73ce35efab2bf2d6ac490142:zm476/libraries_v2/HCSR04 ultrasonic sensor --library /mnt/create-efs/webide/f7/cf/f7cf2c9d73ce35efab2bf2d6ac490142:zm476/libraries_v2/Servo /tmp/2938109266/Untitled_aug04a
WARNING: library ArduinoIoTCloud claims to run on mbed, samd, esp8266, mbed_nano, mbed_portenta, mbed_nicla, esp32, mbed_opta, mbed_giga, renesas_portenta, renesas_uno architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
WARNING: library Arduino_ConnectionHandler claims to run on samd, esp32, esp8266, mbed, megaavr, mbed_nano, mbed_portenta, mbed_nicla, mbed_opta, mbed_giga, renesas_portenta, renesas_uno architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino: In function 'void setup()':
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino:31:3: error: 'ArduinoCloud' was not declared in this scope
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
^~~~~~~~~~~~
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino:31:3: note: suggested alternative: 'Arduino_h'
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
^~~~~~~~~~~~
Arduino_h
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino:31:22: error: 'ArduinoIoTPreferredConnection' was not declared in this scope
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino: In function 'void loop()':
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino:45:3: error: 'ArduinoCloud' was not declared in this scope
ArduinoCloud.update();
^~~~~~~~~~~~
/tmp/2938109266/Untitled_aug04a/Untitled_aug04a.ino:45:3: note: suggested alternative: 'Arduino_h'
ArduinoCloud.update();
^~~~~~~~~~~~
Arduino_h
Error during build: exit status 1