From b7940219c4dbabf1a8ad9d84faf4f5cdf1aa0173 Mon Sep 17 00:00:00 2001 From: Sayan Paul Date: Wed, 13 Mar 2024 01:15:02 +0530 Subject: [PATCH] modifying 14 code --- examples/14_blite_rc_car/14_blite_rc_car.ino | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/14_blite_rc_car/14_blite_rc_car.ino b/examples/14_blite_rc_car/14_blite_rc_car.ino index 8c70a84..16f7273 100644 --- a/examples/14_blite_rc_car/14_blite_rc_car.ino +++ b/examples/14_blite_rc_car/14_blite_rc_car.ino @@ -2,21 +2,16 @@ #include "remote.h" Blite myBot; -ESP8266WebServer wifiRemoteControl(80); void setup(){ myBot.setup(); Serial.begin(115200); myBot.smartConnectWiFi(); - wifiRemoteControl.on("/", HTTP_GET, []() { - Serial.println("Web Server: received a web page request"); - String html = REMOTE_HTML_CONTENT; - wifiRemoteControl.send(200, "text/html", html); - }); - wifiRemoteControl.begin(); + } void loop(){ - wifiRemoteControl.handleClient(); + String html = REMOTE_HTML_CONTENT; + myBot.smartRenderServer(html); if (myBot.buttonPressed()){ myBot.blinkLed(2); }