Loading
Loading
IoT Lab content is currently available in Arabic only. We're working on an English version.
عرض بالعربية →Host a web page inside the ESP32 to control it from your phone.
Connect the LED to pin 2.
// يتطلب استخدام مكتبة WebServer.h
// نعرّف مسارات مثل server.on("/led/on", []() {
// digitalWrite(2, HIGH);
// server.send(200, "text/plain", "LED IS ON");
// });Writing large HTML code inside Arduino as a String variable, consuming memory and making the code unreadable. It's better to use SPIFFS to store files.