#include <AdafruitIO_WiFi.h>
#include "config.h"
#define WIFI_SSID "Wokwi-GUEST"
#define WIFI_PASS ""
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
AdafruitIO_Feed *temperature = io.feed("random");
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
io.connect();
while(io.status() < AIO_CONNECTED){
Serial.print('.');
delay(500);
}
Serial.println(io.statusText());
randomSeed(millis());
}
void loop() {
io.run();
int val = random(100);
temperature->save(val);
Serial.print("Save Value: ");
Serial.println(val);
// put your main code here, to run repeatedly:
delay(10000); // this speeds up the simulation
}