Skip to content

Commit

Permalink
modifying 14 code
Browse files Browse the repository at this point in the history
  • Loading branch information
say-paul committed Mar 12, 2024
1 parent f007989 commit b794021
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions examples/14_blite_rc_car/14_blite_rc_car.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b794021

Please sign in to comment.