Loading
Loading
IoT Lab content is currently available in Arabic only. We're working on an English version.
عرض بالعربية →Log temperature data to the cloud and monitor it via charts from anywhere.
Connect DHT11 to ESP32 on a digital pin.
#include <WiFi.h>
#include <HTTPClient.h>
String apiKey = "YOUR_API_KEY";
String url = "http://api.thingspeak.com/update?api_key=" + apiKey + "&field1=";
void loop() {
int temp = 25; // اقرأ الحساس هنا
HTTPClient http;
http.begin(url + String(temp));
int code = http.GET();
http.end();
delay(20000); // ThingSpeak مجاني يسمح بتحديث كل 15 ثانية فقط
}Putting the code inside a fast loop() without a sufficient long delay, causing your account to be temporarily banned for exceeding the allowed send rate (Rate Limit).