#define THINGER_SERIAL_DEBUG
#include <ThingerESP32.h>
#define username "zahwa2198"
#define device_id "lampu1"
#define credential "87654321"
#define SSID "Wokwi-GUEST"
#define password ""
#define lampu1 21
#define lampu2 19
ThingerESP32 thing(username, device_id, credential);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(21, OUTPUT);
pinMode(19, OUTPUT);
thing.add_wifi(SSID, password);
thing["lampu1"] << digitalPin(21);
thing["lampu2"] << digitalPin(19);
}
void loop() {
// put your main code here, to run repeatedly:
thing.handle();
}