can i detect event when connect wifi and connect thingerio server
i was try with Wifi.status but not show in Serial print
thanks, i have done for wifi. still wait event when connected to server thingerIO
//---------------begin connection
Serial.print(TAG);
Serial.println(" Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
if (WiFi.status() == WL_CONNECTED)
{
delay(500);
Serial.print(TAG);
Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
digitalWrite(PIN_WIFI, HIGH);
}
//---------------end connection
hello @Ahmad_Basarudin ,
Could be helpful if you tell us the device you are using, however, please check these topics:
for ESP8266:
Hi, the current solution relies on overriding a function defined in ThingerClient called thinger_state_listener, that provides information about any state inside thinger, like network connecting, thinger.io connection, etc.
Thus, you can extend your own class to provide such functionality, i.e., replace your thing definition (supposing you are using a ESP8266) with:
class ClientListener : public ThingerESP8266{
public:
ClientListener(const char* user, const char* device, const char* device…
for ESP32:
Hello @14geronimo ,
Please check this post: Check Cloud Connection on Arduino
The adaptation of this code to ESP32 is really easy to do:
#include <ThingerESP32.h>
#define USERNAME "your_user_name"
#define DEVICE_ID "your_device_id"
#define DEVICE_CREDENTIAL "your_device_credential"
#define SSID "your_wifi_ssid"
#define SSID_PASSWORD "your_wifi_ssid_password"
class ClientListener : public ThingerESP32{
public:
ClientListener(const char* user, const char* device, const char* device_crede…
and I know that you are using WiFi but maybe for future doubts, here you can find how to implement ClientListener for other Arduino devices that are using tinyGSM:
Hello @arimukhlas ,
I suppose that you are using thinger.h library and a code based in our ArduinoTinyGSM.ino example.
In this case, you can retrieve the connection status with this code:
// Select your modem:
#define TINY_GSM_MODEM_SIM800
//#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_M590
// uncomment line for debug
// #define _DEBUG_
// Can be installed from Library Manager or https://github.com/vshymanskyy/TinyGSM
#include…
Hope it helps