Skip to main content

NodeMCU WiFi Car

 WiFi Car

  In this Tutorial I will Show you How to Make a WiFi Car Using NodeMCU ESP8266 Board and Some Electronic Components . You can Watch this Video or Read the following blog for more details..

Components Required :

Construction :

  • First you need a cardboard of high Durability.
  • And Mount a Gear motors Using Double Sided Tape or GlueGun.
  • Place the NodeMCU ESP8266 Board on the Cardboard and Connect it to L293N Motor Driver.
  • Connect the Gear motor Wires to the L293N Motor Driver.
  • Now move on to the Software Portion, Open Your Arduino IDE
  • Open Fauceter_WiFi_Car.ino file 
  • Select Board & Port , Click Upload .
  • Now time to Connect a Battery. I use 2no's of li-ion 3.7V battery in Series Connection.
  • After Connecting Batteries, Switch on your Car and Place it on Track.
  • And Install Fauceter WiFi Car Application on your Smartphone to Control the Car.
  • That's Solve Guys !

Circuit Diagram :

        You can follow our DIY Video for Circuit Diagram. I will clearly explained the connections of this WiFi Car. Connect IN1 > D0 , IN2 > D1 , IN3 > D2 , IN4 > D3 and ENA & ENB > D5 & D6

Car controlling Application : 

    Download and Install this App for Controll the WiFi Car
 

Click Here to Download

Arduino Code :

//10 AUGUST 2020
//CRATUS MK10
//FAUCETER WIFI CAR
//BY PRADEEP RAJ (M.P.R)
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
IPAddress ip(192,143,4,3);
IPAddress netmask(255,255,255,0);
ESP8266WebServer server(8080) ;
const char* ssid = "Fauceter WiFi Car";
//M1-LEFT M2-RIGHT
int M1Forward =4 ; //D2--IN3
int M2Forward =16 ; //D0--IN1
int M1Backward =0 ; //D3--IN4
int M2Backward =5 ; //D1--IN2
int M1ENB = 12; //D6--EB
int M2ENB = 14; //D5--EA
void setup() {
pinMode(M1Forward, OUTPUT);
pinMode(M2Forward, OUTPUT);
pinMode(M1Backward, OUTPUT);
pinMode(M2Backward, OUTPUT);
pinMode(M1ENB, OUTPUT);
pinMode(M2ENB, OUTPUT);
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(ip,ip,netmask);
WiFi.softAP(ssid);
server.on("/move",HTTP_GET,Move);
server.onNotFound(NotConnected);
Serial.begin(115200);
server.begin();
}
void loop() {
server.handleClient();
Serial.println(".......");
Serial.println("WIFI Connected");
Serial.println("NODE MCU Local IP address ");
Serial.print(WiFi.localIP());
}
void Move() {
if (!server.hasArg("dir")) {
server.send(404,"text / plain","Move : Undefined");
return;
}
String direction = server.arg("dir");
if (direction.equals("F")) {
forward();
server.send(200,"text / plain","Move : Forward");
}
else if (direction.equals("R")) {
Right();
server.send(200,"text / plain","Move : Right");
}
else if (direction.equals("L")) {
Left();
server.send(200,"text / plain","Move : Left");
}
else if (direction.equals("B")) {
backward();
server.send(200,"text / plain","Move : Backward");
}
else {
stop();
server.send(200,"text / plain","Move : Stop");
}
}
void NotConnected() {
server.send(404, "text / plain", "404 : Devicce Not found");
}
void forward() {
digitalWrite(M1ENB, HIGH);
digitalWrite(M2ENB, HIGH);
digitalWrite(M1Forward,HIGH);
digitalWrite(M1Backward,LOW);
digitalWrite(M2Forward,HIGH);
digitalWrite(M2Backward,LOW);
}
void backward(){
digitalWrite(M1ENB, HIGH);
digitalWrite(M2ENB, HIGH);
digitalWrite(M1Forward,LOW);
digitalWrite(M1Backward,HIGH);
digitalWrite(M2Forward,LOW);
digitalWrite(M2Backward,HIGH); }
void Right(){
digitalWrite(M1ENB, HIGH);
digitalWrite(M2ENB, HIGH);
digitalWrite(M1Forward,HIGH);
digitalWrite(M1Backward,LOW);
digitalWrite(M2Forward,LOW);
digitalWrite(M2Backward,HIGH);
}
void Left(){
digitalWrite(M1ENB, HIGH);
digitalWrite(M2ENB, HIGH);
digitalWrite(M1Forward,LOW);
digitalWrite(M1Backward,HIGH);
digitalWrite(M2Forward,HIGH);
digitalWrite(M2Backward,LOW);
}
void stop(){
digitalWrite(M1ENB, LOW);
digitalWrite(M2ENB, LOW);
digitalWrite(M1Forward,LOW);
digitalWrite(M1Backward,LOW);
digitalWrite(M2Forward,LOW);
digitalWrite(M2Backward,LOW);
}


Comments

Post a Comment

Popular posts from this blog

Arduino Line Following Car

Line Follower      In this Arduino Tutorial I will Show you How to Make a Line Following Car Using Arduino Uno Board and Some Electronic Components . You can Watch this Video or Read the following blog for more details.. Working Principle :          Line Follower has a basic and necessary Component   IR Sensor which act as Vision. It works on the principle of Black Surface Absorbs all  Wavelengths of Light Rays. Then the IR Sensors mounted infront of the car detects black line and makes a movement based on your code.

Arduino Smart Car

Smart Car          In this Arduino Tutorial I will show You How to make a Smart Car using Arduino Uno Board and other some Electronic Components. You can Watch this Video or Read the Following Blog for more details.

Measuring Distance Using UltraSonic Sensor with Arduino

Measuring Distance     Using Arduino, UltraSonic Sensor & OLED Display                In this Arduino Tutorial , I will show you How to Measure a Distance of an Object Using Arduino , UltraSonic Sensor & OLED Display . You can watch this Video or Read the following Blogs for More Details.

N95 Respirator Mask

N95

Arduino Object Following Robot

Object Following Robot     Watch the entire DIY Video of making (J.A.O.F) Arduino Object Following Robot...

NodeMCU WiFi Switch

 Wi-Fi Switch          In this Tutorial , I will Show you How to Control your Home Appliances by Using Smartphone Over WiFi Connection with NodeMCU ESP8266 Board and Relay(Electric Switch). You can watch this Video or read the following Blog for more Details...