#include <WiFi.h>
#include "DHTesp.h"
#include "ThingSpeak.h"
//Pin
const int dht = 15;
const int red = 13;
//WIFI
const char* ssid = "Wokwi-GUEST";
const char* pass = "";
//ThingSpeak
const int chnl = 2790605;
const char* key = "50DFPOIC129S4N1A";
const char* svr = "api.thingspeak.com";
DHTesp dhtSensor;
WiFiClient client;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
dhtSensor.setup(dht, DHTesp::DHT22);
pinMode(red, OUTPUT);
WiFi.begin(ssid, pass);
while(WiFi.status() != WL_CONNECTED){
delay(500);
Serial.println("WiFi tidak terhubung");
}
Serial.println("WiFi terhubung");
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}