#define THINGER_SERIAL_DEBUG
#include<ThingerESP32.h>
#define username "dartono"
#define device_id "sensor"
#define credential "123456"
#define SSID "Wokwi-GUEST"
#define pass ""
ThingerESP32 thing(username, device_id, credential);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
thing.add_wifi(SSID, pass);
pinMode (21, OUTPUT);
pinMode(5, OUTPUT);
thing["Lampu1"] << digitalPin(21);
thing["Lampu2"] << digitalPin(5);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
thing.handle();
}