The solution requires HTTPS connection to a webserver with Google Chrome, the only one that supports Webkit!

RC car controlled by voice - Try online HERE!!!


  • Solution uses the ESP8266 microcontroller, which connects to the HTTPS website at regular intervals, where it downloads the contents of a text file.
  • Commands that ESP8266 executes on the RC car are written to the text file individually.
  • Commands are entered by the system user connected via HTTPS protocol in the web interface via the browser Google Chrome. Any world language can be used, including the language region. The current program implementation uses English in the US region.
  • The process of converting voice to text is performed by Google servers on an Xhr request that is automatically triggered by the user.
  • There are four supported commands for move forward, backward, and to sides.
  • There is a 2000 millisecond pause between the two connections until the connection is terminated and the current voice command is executed.
  • System response is connection is virtually instantaneous within 30 milliseconds.
  • ESP8266 uses HTTPS connectivity with the webserver through the implementation of the WifiClientSecure library and the webserver certificate.
  • The system is suitable for school projects as well as autonomous vehicles controlled from anywhere on the ground. The project can be completed with a camera record and various other sensors.
  • Compatibility for (in version Arduino Core 2.3.0):

  • ESP8266-Generic
  • NodeMCU (v1 - v3)
  • Wemos D1
  • Wemos D1 mini
  • Program for ESP8266

    /*|-------------------------------------------------|*/
    /*| RC CAR VOICE CONTROL VIA WEB INTERFACE          |*/
    /*| Webkit (GOOGLE) technology for voice-to-text    |*/
    /*| Author: Martin Chlebovec (martinius96)          |*/
    /*| LANGUAGE English - region US --> en-US          |*/
    /*|-------------------------------------------------|*/
    #include <ESP8266WiFi.h>
    #include <WiFiClientSecure.h>
    
    const char * ssid = "WIFI_NAME";
    const char * password = "WIFI_PASSWORD";
    const char * host = "arduino.php5.sk"; //yourdomain
    const int httpsPort = 443; //https port
    const char * fingerprint = "‎b0 6d 7f 8c 98 78 8e 6e 0a 57 a8 2f 7e d1 40 2a 1e 3f 48 f7"; //SHA1 certificate fingerprint
    
    void setup() {
      Serial.begin(115200);
      Serial.println();
      Serial.print("Connecting to WiFi: ");
      Serial.println(ssid);
      WiFi.begin(ssid, password);
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }
      Serial.println("");
      Serial.println("WiFi connected");
      Serial.println("IP address: ");
      Serial.println(WiFi.localIP());
    }
    void executed_command() {
      WiFiClientSecure client;
      if (!client.connect(host, httpsPort)) {
        Serial.println("Connection not sucessful");
        return;
      }
      String url = "/php_car/command_executed.php";
      client.print(String("GET ") + url + " HTTP/1.1\r\n" +
                   "Host: " + host + "\r\n" +
                   "User-Agent: NodeMCU\r\n" +
                   "Connection: close\r\n\r\n");
      Serial.println("Connection sucessful");
      Serial.println("Command executed to PHP service");
    }
    void loop() {
      WiFiClientSecure client;
      Serial.print("Connecting to server ");
      Serial.println(host);
      if (!client.connect(host, httpsPort)) {
        Serial.println("Connection not sucessful");
        return;
      }
      String url = "/php_car/translation.txt";
      client.print(String("GET ") + url + " HTTP/1.1\r\n" +
                   "Host: " + host + "\r\n" +
                   "User-Agent: NodeMCU\r\n" +
                   "Connection: close\r\n\r\n");
      Serial.println("Connection sucessful");
      while (client.connected()) {
        String line = client.readStringUntil('\n');
        if (line == "\r") {
          break;
        }
      }
      String line = client.readStringUntil('\n');
      Serial.println("RC control command: ");
      Serial.println(line);
      if (line == "UP") { //if command == go UP
    
    
        Serial.println("Moving forward...");
        // PUT CODE FOR MOVE FORWARD THERE
        executed_command();
    
      } else if (line == "DOWN") { //if command == go DOWN
    
    
        Serial.println("Moving backward...");
        // PUT CODE FOR MOVE BACKWARD THERE
        executed_command();
    
      } else if (line == "LEFT") { //if command == TURN LEFT
    
    
        Serial.println("Turning left...");
        // PUT CODE FOR TURN LEFT THERE
        executed_command();
    
      } else if (line == "RIGHT") { //if command == TURN RIGHT
    
    
        Serial.println("Turning right...");
        // PUT CODE FOR TURN RIGHT THERE
        executed_command();
    
      } else if (line == "Last command executed by ESP8266. Waiting for new command.") { //if command == NO_MORE_COMMAND
    
    
        Serial.println("No voice command set yet");
    
    
      } else {
    
        Serial.println("This command is not suported");
        executed_command();
      }
    
      delay(2000); // WAIT () miliseconds before next reading of variable
    }