Hi, I’m new in Cayenne and I want to do this
-Connect to Cayenne
-Network goes off
-Still send data through Serial Monitor
-If network is available again, reconnect
But I’ve not found out anything helpful
#include <CayenneMQTTESP32.h> //Librería de Cayenne MQTT
#define CAYENNE_PRINT Serial
// Información de red WiFi
char ssid[] = "xd";
char wifiPassword[] = "xd";
char username[] = "xd";
char password[] = "xd";
char clientID[] = "xd";
void setup()
{
Serial.begin(115200);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}
void loop()
{
Cayenne.loop();
}
CAYENNE_OUT(1)
{
int pot = analogRead(34);
//Envió de lecturas cada 10 segundos.
Cayenne.virtualWrite(1, pot);
//Se imprimen los siguientes datos en el monitor serie.
CAYENNE_PRINT.println("Enviando Temperatura a Cayenne:");
CAYENNE_PRINT.println(pot);
}