Mayank Kumar
Published

Universal controlled car

A car that can be controlled from anywhere in the world over the internet.

BeginnerFull instructions provided294
Universal controlled car

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Rechargeable Battery, Lithium Ion
Rechargeable Battery, Lithium Ion
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
BO Motor
×1
Chassis
×1

Software apps and online services

Blynk
Blynk
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Hot glue gun (generic)
Hot glue gun (generic)
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

Schematic

Code

Wi-Fi car (code)

C/C++
#include<ESP8266WiFi.h>
#include<BlynkSimpleEsp8266.h>

char authcode[] = "5ogwvDTJ7HJqvASVSdmLxzgXXur4lc_o";     //Auth Code
char wifissid[] = "no device foud";                               //WiFi Name
char wifipassword[] = "nahipata";                         //WiFi Password

int vValue = 0;           //Store V1 parameters

int m1 = 16;        //pin 0
int m2 = 5;         //pin1
int m3 = 4;         //pin2
int m4 = 14;        //pin5
void setup() {
  Serial.begin(9600);
  Blynk.begin(authcode,wifissid,wifipassword);

  pinMode(m1,OUTPUT);     // pin define
  pinMode(m2,OUTPUT);
  pinMode(m3,OUTPUT);
  pinMode(m4,OUTPUT);

  digitalWrite(m1,LOW);   //stop 
  digitalWrite(m2,LOW);
  digitalWrite(m3,LOW);
  digitalWrite(m4,LOW);
}
BLYNK_WRITE(V1){
  vValue = param.asInt();
  Serial.println(vValue);  
}
void loop() {
  
  Blynk.run();
  
  if (vValue == 1){           //FORWARD
    digitalWrite(m1,HIGH);
    digitalWrite(m2,LOW);
    digitalWrite(m3,HIGH);
    digitalWrite(m4,LOW);
  }
  
  if (vValue == 2){           //LEFT
    digitalWrite(m1,HIGH);
    digitalWrite(m2,LOW);
    digitalWrite(m3,LOW);
    digitalWrite(m4,HIGH);
  }
    
  if (vValue == 3){           //RIGHT
    digitalWrite(m1,LOW);
    digitalWrite(m2,HIGH);
    digitalWrite(m3,HIGH);
    digitalWrite(m4,LOW);
  }
    
  if (vValue == 4){            //BACKWARD
    digitalWrite(m1,LOW);
    digitalWrite(m2,HIGH);
    digitalWrite(m3,LOW);
    digitalWrite(m4,HIGH);
  } 
  if (vValue == 0){            //STOP
    digitalWrite(m1,LOW);
    digitalWrite(m2,LOW);
    digitalWrite(m3,LOW);
    digitalWrite(m4,LOW);
  }
  
}

Wi-Fi car

Credits

Mayank Kumar

Mayank Kumar

1 project • 1 follower
I am a student. I love to learn new things and execute them. My channel youtube.com/innovativecreations

Comments

Add projectSign up / Login