Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » WiFi Controlled Robot using ESP8266 & Android App
ESP8266 Projects IoT Projects

WiFi Controlled Robot using ESP8266 & Android App

Mamtaz AlamBy Mamtaz AlamUpdated:May 29, 20231 Comment4 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
WiFi Controlled Robot
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview: WiFi Controlled Robot

This tutorial will show you how to build an Internet or WiFi Controlled robot using NodeMCU ESP8266 Board. There are many types of Robots or Robotic Car from simple ones like Toys to advanced ones like industrial Robotic Arms.

This WiFi Controlled Robot is made using Wemos D1 Chip as a control unit. To control the pair of Motors, we used L298n Motor Driver IC Module. We can power on the circuit using any battery as the power requirement is more than 5V. The Robot can be controlled using an Android App which is designed using an MIT APP Inventor Software.

We have already covered many types of Robots in earlier projects using different technologies, have a look at them:
1. Bluetooth Controlled Robot
2. Gesture Controlled Robot
3. Voice Controlled Robot




Bill of Materials

Here are the list of components that you need for making this Robotic Car Project. You can purchase all the components from Amazon link.

S.N.Components NameQuantityPurchase Links
1NodeMCU ESP8266-12E Board or Wemos D1 Mini1Amazon | AliExpress
2L298n Motor Driver IC Module1Amazon | AliExpress
3Robot Chasis Kit1Amazon | AliExpress
43.7V Samsung 18650 Battery2Amazon | AliExpress
5Jumper Wires20Amazon | AliExpress
6Breadboard1Amazon | AliExpress
7USB Cable1Amazon | AliExpress

Circuit Diagram & Hardware

Here is the schematic for this WiFi Controlled Robot Project designed using Fritzing software. We will control the two DC motors via L298 Motor Driver IC. You can use 200-300 RPM DC Motor for this application. The main control unit is Wemos D1 Board which connects and controls the entire circuit and equipment. And to power the circuit we will use a 6V DC Battery or a pair of Lithium-Ion batteries connected in series.

WiFi Controlled Robot Circuit

Connect the battery to the L298 Motor Driver power supply input. Connect all 4 inputs of L298 to ESP8266 D3, D4, D7 & D8 Pin. Supply 5V to Wemos through L298 5V Pin. Connect the output pins of L298 to left and right motors.

NodeMCU ESP8266 WiFi Controlled Robotic Car

Assemble the robotic car with base and chassis. I used a pair of 3.7V Samsung 18650 Batteries to power the circuit. The batteries are connected in series and hence overall voltage is around 8V. I have used the transparent chassis made using glass fiber. You can use metallic or wooden anything that fulfills your requirement. Tightly screw all the components and mount them on the chassis. Use good quality and strong wheels so that the robot can move even on rough surfaces.



The Android App Design

Now we need to design an Android Application for ESP8266 WiFi Controlled Robot. The easiest way to design an Android Application is using MIT App Inventor. The MIT APP Inventor lets you develop applications for Android phones using a web browser and either the connected phone or emulator. The App Inventor servers store your work and help you keep track of your projects.

I have simply designed an Interface for this Robotic Project. The App has 5 pairs of Switch to Send the 0 and 1 command to Web Server.

Similarly the block editor which contains assignment and programming information is given below.

Build/Compile the Application and export it to your Android Phone. You can install the APK file on your phone.

Download: WiFi Controlled Robot APK File




Source Code/Program

The source code/program for WiFi Controlled Robot Robot is very simple and you can program the Wemos D1 Board using Arduino IDE.

In this code part, change the WiFi SSID & Password from these lines.

1
2
const char* ssid = "Azephyrad";
const char* password = "@guinevere@@@";

Copy the complete code from below and get your ESP8266 Board for programming.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* include library */
#include <ESP8266WiFi.h>
 
/* define port */
WiFiClient client;
WiFiServer server(80);
 
/* WIFI settings */
const char* ssid = "Azephyrad";
const char* password = "@guinevere@@@";
 
/* data received from application */
String  data = "";
 
/* define L298N or L293D motor control pins */
int leftMotorForward = 2;     /* GPIO2(D4) -> IN3   */
int rightMotorForward = 15;   /* GPIO15(D8) -> IN1  */
int leftMotorBackward = 0;    /* GPIO0(D3) -> IN4   */
int rightMotorBackward = 13;  /* GPIO13(D7) -> IN2  */
 
 
void setup()
{
  Serial.begin(115200);
  /* initialize motor control pins as output */
  pinMode(leftMotorForward, OUTPUT);
  pinMode(rightMotorForward, OUTPUT);
  pinMode(leftMotorBackward, OUTPUT);
  pinMode(rightMotorBackward, OUTPUT);
 
  //connect to your local wi-fi network
  WiFi.begin(ssid, password);
 
  // Attempt to connect to WiFi network:
  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print(".");
    // Connect to WPA/WPA2 network. Change this line if using open or WEP  network:
    // Wait 3 seconds for connection:
    delay(3000);
  }
 
  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());   //You can get IP address assigned to ESP
 
  /* start server communication */
  server.begin();
}
 
void loop()
{
  /* If the server available, run the "checkClient" function */
  client = server.available();
  if (!client) return;
  data = checkClient ();
 
  /************************ Run function according to incoming data from application *************************/
 
  /* If the incoming data is "forward", run the "MotorForward" function */
  if (data == "forward") MotorForward();
  /* If the incoming data is "backward", run the "MotorBackward" function */
  else if (data == "backward") MotorBackward();
  /* If the incoming data is "left", run the "TurnLeft" function */
  else if (data == "left") TurnLeft();
  /* If the incoming data is "right", run the "TurnRight" function */
  else if (data == "right") TurnRight();
  /* If the incoming data is "stop", run the "MotorStop" function */
  else if (data == "stop") MotorStop();
}
 
/********************************************* FORWARD *****************************************************/
void MotorForward(void)
{
  digitalWrite(leftMotorForward, HIGH);
  digitalWrite(rightMotorForward, HIGH);
  digitalWrite(leftMotorBackward, LOW);
  digitalWrite(rightMotorBackward, LOW);
}
 
/********************************************* BACKWARD *****************************************************/
void MotorBackward(void)
{
  digitalWrite(leftMotorBackward, HIGH);
  digitalWrite(rightMotorBackward, HIGH);
  digitalWrite(leftMotorForward, LOW);
  digitalWrite(rightMotorForward, LOW);
}
 
/********************************************* TURN LEFT *****************************************************/
void TurnLeft(void)
{
  digitalWrite(leftMotorForward, LOW);
  digitalWrite(rightMotorForward, HIGH);
  digitalWrite(rightMotorBackward, LOW);
  digitalWrite(leftMotorBackward, HIGH);
}
 
/********************************************* TURN RIGHT *****************************************************/
void TurnRight(void)
{
  digitalWrite(leftMotorForward, HIGH);
  digitalWrite(rightMotorForward, LOW);
  digitalWrite(rightMotorBackward, HIGH);
  digitalWrite(leftMotorBackward, LOW);
}
 
/********************************************* STOP *****************************************************/
void MotorStop(void)
{
  digitalWrite(leftMotorForward, LOW);
  digitalWrite(leftMotorBackward, LOW);
  digitalWrite(rightMotorForward, LOW);
  digitalWrite(rightMotorBackward, LOW);
}
 
/********************************** RECEIVE DATA FROM the APP ******************************************/
String checkClient (void)
{
  while (!client.available()) delay(1);
  String request = client.readStringUntil('\r');
  request.remove(0, 5);
  request.remove(request.length() - 9, 9);
  return request;
}



Connect the micro-USB Data cable between the computer and the Wemos D1 Mini Board.

On the Arduino IDE, select Tools, and from the Board Part select Wemos D1 Mini Board. In case if you are using NodeMCU Board, you can select NodeMCU 1.0 Board. Then select the COM Port & hit the upload button to upload the code.


Testing the WiFi Controlled Robot

After uploading the code click on the serial monitor. So, the Serial Monitor will display the IP Address once it connects to the WiFi Network. Note this IP Address as it is required in the Android App.

Open the Android App installed on your phone and enter the IP Address that you noted earlier.

Now you can control the Robot. To move the Robot in the forward direction, press the UP arrow key, and to move it backward, press the DOWN arrow key. Similarly, to move the Robot left and Right press the Left and Right arrow keys.

Android Controlled Robot

This is how you can make your own WiFi Controlled Robot and control the Robot using the Android Application.


Video Tutorial & Guide

Amazing! DIY Wireless/WiFi Based Robotic Car Control with Your Smartphone
Watch this video on YouTube.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleIoT Based Smart Kitchen Automation & Monitoring with ESP8266
Next Article Using SD Card Module with Arduino | Read/Write/Data Logger

Related Posts

IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

Updated:May 10, 20261K
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

Updated:May 2, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

Updated:April 27, 20261K
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

Updated:April 27, 20262K
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

Updated:February 1, 20261K
View 1 Comment

1 Comment

  1. PRAKASH on December 25, 2022 12:01 PM

    Nice project. Error1101: Unable to get response with specified UR: http://192.168.0.106/%5Bcommand%5D such error I get from all the buttons. Kindly through some light.

    Reply

CommentsCancel reply

Latest Posts
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

May 31, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

DIY Colorimeter using AS7265x Spectroscopy Sensor & ESP32

February 1, 2026
Top Posts & Pages
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • IoT Based Drinking Water Quality Monitoring with ESP32
    IoT Based Drinking Water Quality Monitoring with ESP32
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • DIY IoT Water pH Meter using pH Sensor & ESP32
    DIY IoT Water pH Meter using pH Sensor & ESP32
  • Buck Converter: Basics, Working, Design & Application
    Buck Converter: Basics, Working, Design & Application
  • How to use Modbus RTU with ESP32 to read Sensor Data
    How to use Modbus RTU with ESP32 to read Sensor Data
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (204)
    • ESP32 MicroPython (7)
    • ESP32 Projects (81)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.