Modesty
November 28, 2022, 8:48am
1
Hi
I use standard
Cayenne.begin(username, password, clientID, SSID, wifipass);
My issue is that I would like to get a print to my Serial.print("WiFi not connected "); + OLED if wifi dont connect properly.
Is there a possibility in cayenne library to check if wifi is connected?
If yes, can you help me with correct command?
you can use below two functions do it.
CAYENNE_CONNECTED(){
CAYENNE_LOG("Connection established");
}
CAYENNE_DISCONNECTED(){
CAYENNE_LOG("Connection Lost");
}
1 Like
Modesty
November 30, 2022, 8:12am
3
Thanks @shramik_salgaonkar
Shall this be placed in void setup() like this?
Cayenne.begin(username, password, clientID, SSID, wifipass);
}
// WiFi Cayenne control
CAYENNE_CONNECTED(){
CAYENNE_LOG("Connection established");
}
CAYENNE_DISCONNECTED(){
CAYENNE_LOG("Connection Lost");
}
Or in void loop()?
Outside of both setup and loop.
1 Like