#include <WiFi.h>
#include <HTTPClient.h>
const char* ssid = "Wokwi-GUEST";
const char* password = "";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED) {
Serial.print('.');
delay(1000);
}
Serial.println(WiFi.localIP());
}
void loop() {
HTTPClient https;
String URL = "https://www.boredapi.com/api/activity";
https.begin(URL.c_str());
https.GET();
String JSONresponse = https.getString();
https.end();
Serial.println(JSONresponse);
Serial.println("Waiting 10 secs...");
delay(10000);
}