-#include <Servo.h>
+
 #include <ESP8266WiFi.h>
 
 
-const int leftF = -1;
-const int rightF = 1; 
-const int pinL = 4;
-const int pinR = 5;
+const int pinPWML = 4;
+const int pinPWMR = 5;
+const int pinDL = 0;
+const int pinDR = 2;
+int power = 1023;
+char lastCommand = ' ';
 
 WiFiServer server(80);
 
 
-long lastCommand = 0;
+long lastCommandTime = 0;
 long currentTime;
 long previousTime;
 long timeoutTime = 2000;
 String header;
 //bool stopedL = true;
 //bool stopedR = true;
+
+void showPage(WiFiClient& client);
+void left();
+void right();
+void forward();
+void backward();
+void stop();
+void setPower(int p);
 
 
 void setup() {

//      stopAll();
//    }
}

            
            char command = getCommand(header);
            
            if(command == 'i') showPage(client);
            else {
              switch(command){
                case 'f':
                 forward();
                 break;
                case 'b':
                 backward();
                 break;
                case 'x':
                 stop();
                 break;
                case 'r':
                 right();
                 break;
                case 'l':
                 left();
                 break; 
                case '0':
                case '1':
                case '2':
                case '3':
                case '4':
                case '5':
                case '6':
                case '7':
                case '8':
                setPower((int)command-48);
                break;
                default:
                break;
              }
            }
            break;
          } else { // if you got a newline, then clear currentLine
            currentLine = "";
