Hello everybody, I am trying to use the arduino cloud with the xiao esp32C3 board from seeedstudio and it is not recognized under the web editor a red x is displayed. Thanks for your help.
Hi!
Could you provide more details about your issue?
What OS and version are you using?
Are you using the latest version of Create Agent?
What kind of board do you select?
Hi
I have downloaded the latest Create Agent from Arduino for the Mac OS ventura. Well i have created three variables : CO2, temperature and humidity. My sketch uses the Wire library (note that I have included the Wire and the SensirionScd4x libraries) with an I2C connection to an SCD40 from Sensirion. It works fine on the Arduino IDE, but when I use it on the Arduino cloud I cannot select the XIAO ESP32-C3 board there is a red cross on the Web UI of the cloud. I have tried to use an other ESP32-C3 generic board but I cannot get the I2C working.
I assume that the reason is not being able to use the XIAO ESP32-C3. `
float humCloud;
float tempCloud;
int cO2Cloud;
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"
#include "SensirionI2CScd4x.h"
#include "Wire.h"
//#define SDA 5 not necessary with XIAO ESP32C3
//#define SCL 4
char ssid[] = "Livebox-24_5GHz";
char pass[] = "";
SensirionI2CScd4x scd4x;
/*
void printUint16Hex(uint16_t value) {
Serial.print(value < 4096 ? "0" : "");
Serial.print(value < 256 ? "0" : "");
Serial.print(value < 16 ? "0" : "");
Serial.print(value, HEX);
}
void printSerialNumber(uint16_t serial0, uint16_t serial1, uint16_t serial2) {
Serial.print("Serial: 0x");
printUint16Hex(serial0);
printUint16Hex(serial1);
printUint16Hex(serial2);
Serial.println();
}*/
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);
Wire.begin();
uint16_t error;
char errorMessage[256];
scd4x.begin(Wire);
// 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();
error = scd4x.stopPeriodicMeasurement();
if (error) {
Serial.print("Error trying to execute stopPeriodicMeasurement(): ");
errorToString(error, errorMessage, 256);
Serial.println(errorMessage);
}
error = scd4x.stopPeriodicMeasurement();
if (error) {
Serial.print("Error trying to execute stopPeriodicMeasurement(): ");
errorToString(error, errorMessage, 256);
Serial.println(errorMessage);
}
}
void loop() {
ArduinoCloud.update();
uint16_t error;
char errorMessage[256];
delay(100);
// Read Measurement
uint16_t co2 = 0;
float temperature = 0.0f;
float humidity = 0.0f;
int cO2Cloud = co2;
float tempCloud = temperature;
float humCloud = humidity;
bool isDataReady = false;
error = scd4x.getDataReadyFlag(isDataReady);
if (error) {
Serial.print("Error trying to execute getDataReadyFlag(): ");
errorToString(error, errorMessage, 256);
Serial.println(errorMessage);
return;
}
if (!isDataReady) {
return;
}
error = scd4x.readMeasurement(co2, temperature, humidity);
if (error) {
Serial.print("Error trying to execute readMeasurement(): ");
errorToString(error, errorMessage, 256);
Serial.println(errorMessage);
} else if (co2 == 0) {
Serial.println("Invalid sample detected, skipping.");
} else {
Serial.print("Co2:");
Serial.print(co2);
Serial.print("\t");
Serial.print("Temperature:");
Serial.print(temperature);
Serial.print("\t");
Serial.print("Humidite:");
Serial.println(humidity);
}
}
/*
Since CO2 is READ_WRITE variable, onCO2Change() is
executed every time a new value is received from IoT Cloud.
*/
void onCO2Change() {
// Add your code here to act upon CO2 change
}
/*
Since Temperature is READ_WRITE variable, onTemperatureChange() is
executed every time a new value is received from IoT Cloud.
*/
void onTemperatureChange() {
// Add your code here to act upon Temperature change
}
/*
Since Humidite is READ_WRITE variable, onHumiditeChange() is
executed every time a new value is received from IoT Cloud.
*/
void onHumiditeChange() {
// Add your code here to act upon Humidite change
}
Have the same problem.
Worked for about 5 min.
Made a test with wire.h's scan.
It worked before with the same chip. Now it's dead.
I'm using adafruit soil moisture.
One out of 3 is still working.
Same code different key. Connected to a local thingsboard.
Same problem here, ever since last update.
Hi @ardkool XIAO ESP32C3 should be supported by IoTCloud and the web editor. Could you please provide more details about your issue?
Hi pennam, thx for replying. I have noticed that on 1 computer there was no connection possible but on another there was. Previously both would be working fine. So current situation is strange but working. The other PC shows a random esp32c3 as device when adding it. There is no choice of equipment possible. Subsequently when adding the credentials and moving on it does not regognize anything and you cannot upload. I will try to record the screen next time.
Hi pennan, bug went away no traces left no error messages nothing. Both PCs functioning normal. One had an update. esp32c3 is blinking away like never before with test thing.
Anyway, thx for answering. Keep coding.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.