Problem in the wifi connection of the card with the application

Good afternoon, I have a cart project controlled by cell phone and via wifi network.
Originally it was a project via bluetooth network, but I made changes to make it via wifi network.
Date: "???????" On the serial monitor when trying to move the cart with the app controllers.
I try to make sure that by clicking on the arrows in the application, the cart will move accordingly.

Physical board: Wemos D1 R2 Wifi Esp8266 Esp12 board
Arduino specified board: LOLIN (WEMOS) D1 R2 & mini.
Card Manager: http://arduino.esp8266.com/stable/package_esp8266com_index.json

Code:

int led = D3;        //led 
int outPin1 = D4;     //motor1 
int outPin2 = D5;    //motor1 
int outPin4 = D6;   //motor2 
int outPin3 = D7;   //motor2 
char bt = 0;       //BT  
/*------------------------------------------------------------------------------*/ 
#include <ESP8266WiFi.h>
#include <WiFiClient.h> 
#include <ESP8266WebServer.h>

String command;             //String to store app command state.
int speedCar = 800;         // 400 - 1023.
int speed_Coeff = 3;

const char* ssid = "Autobots";
const char* password = "12345678";
ESP8266WebServer server(80);
/*------------------------------------------------------------------------------*/ 
void setup() 
{ 
Serial.begin(9600); 
pinMode(outPin1,OUTPUT); 
pinMode(outPin2,OUTPUT); 
pinMode(outPin3,OUTPUT); 
pinMode(outPin4,OUTPUT); 
pinMode(led,OUTPUT); 
Serial.begin(115200);
// Connecting WiFi


  WiFi.mode(WIFI_AP);
  WiFi.softAP(ssid);

  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
 
 // Starting WEB-server 
     server.on ( "/", HTTP_handleRoot );
     server.onNotFound ( HTTP_handleRoot );
     server.begin();    
} 
void loop() 
{ 
  server.handleClient();
  command = server.arg("State");
if (Serial.available() > 0) 
{ 
 bt = Serial.read(); 
 digitalWrite(led, 1); 
 /*________________________________________________________________________*/ 
 if(bt == 'F')        //move forwards 
 { 
   digitalWrite(outPin1,HIGH); 
   digitalWrite(outPin2,LOW); 
   digitalWrite(outPin3,HIGH); 
   digitalWrite(outPin4,LOW); 
 } 
 else if (bt == 'B')       //move backwards 
 { 
   digitalWrite(outPin1,LOW); 
   digitalWrite(outPin2,HIGH); 
   digitalWrite(outPin3,LOW); 
   digitalWrite(outPin4,HIGH); 
 } 
 else if (bt == 'S')     //stop!! 
 {    
   digitalWrite(outPin1,LOW); 
   digitalWrite(outPin2,LOW); 
   digitalWrite(outPin3,LOW); 
   digitalWrite(outPin4,LOW); 
 } 
 else if (bt == 'R')    //right 
 { 
   digitalWrite(outPin1,HIGH); 
   digitalWrite(outPin2,LOW); 
   digitalWrite(outPin3,LOW); 
   digitalWrite(outPin4,LOW); 
 } 
 else if (bt == 'L')     //left 
 { 
   digitalWrite(outPin1,LOW); 
   digitalWrite(outPin2,LOW); 
   digitalWrite(outPin3,HIGH); 
   digitalWrite(outPin4,LOW); 
 } 
 else if (bt == 'I')    //forward right 
 { 
   digitalWrite(outPin1,HIGH); 
   digitalWrite(outPin2,LOW); 
   digitalWrite(outPin3,LOW); 
   digitalWrite(outPin4,HIGH); 
 } 
 else if (bt == 'G')    //forward left 
 { 
   digitalWrite(outPin1,LOW); 
   digitalWrite(outPin2,HIGH); 
   digitalWrite(outPin3,HIGH); 
   digitalWrite(outPin4,LOW); 
 } 
 } 
} 

void HTTP_handleRoot(void) {

if( server.hasArg("State") ){
       Serial.println(server.arg("State"));
  }
  server.send ( 200, "text/html", "" );
  delay(1);
}

What I've already tried:
Specify the NodeMCU 1.0 board (ESP-12E Module) on the arduino, but in this way the wifi network was not generated.
I thought it was a bluetooth conflict so I removed it but it didn't show any changes.

Important:
I patched the wifi code into the cart drive code.
Wifi code taken from the website and app: 11 Simple Steps to Make WiFi car Using NodeMCU
Cart code, a friend gave me, I didn't remove anything from his code and he doesn't know what the problem is either.

The posted code doesn't compile because it isn't complete.

Any parameter sent by HTTP isn't handled in that part of the code you posted.

Arrows of which application?

Bad, bad idea to change the board selection to a board you're not using. That's a good way to lower the chances that your project will succeed.

Sorry, I didn't understand your comment.
I posted the entire code and it is compiling without giving an error on my computer.
For the code to work you need to insert the above mentioned additional url in the board manager and add the ESP8266 library.

As for the app, I thought I posted it, my mistake
Application link:

Have you really tried with the posted code? I doubt. At the very least an closing curly brace is missing at the end, maybe more, we don't know. The code is badly formatted, so it's not surprising that such errors are not detected. Use the Auto Format option in the IDE if you're not used to do it yourself.

Do you expect us to install it on a phone? A link to it's home page or source code would help much more.

The code you posted reacts on commands from the serial interface and replies empty pages to web requests but won't do anything in response to such a request.

I'm not sure, is it your interpreting skills or arduino skills that are rubbish?

Sir, to compile the code you need to install the library I mentioned since my first post, insisting on compiling the code without adding the library will only result in an error.

Referring application to my first post inserted a website in my first post which my cart usage code contains for my cart, creator channel link and comments download link, on youtube contains application security.

So if you are unable to help, keep silent and save my time from answering posts that don't in my silence and study on arduino.

Thanks for listening :-).

Editing your first post and then telling me to write rubbish isn't actually fair or honest.

I read these posts, and I don't see any problem description anywhere.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.