CINTAA@RaubAsyuwad Azmi
Published

Internet of Things Robot for Beginner

Simple and full instruction for the beginner!

BeginnerFull instructions provided3 hours96
Internet of Things Robot for Beginner

Things used in this project

Hardware components

NodeMCU V2 Doit ESP12E (Narrow)
USB Driver Version: CH340/CH341
×1
NodeMCU V2 Amica
USB Driver Version: CP2102
×1
L293D Shield for NodeMCU V2
×1
USB Micro B Cable
×1
2WD Smart Robot Car Chassis
×1
Mini Jumper With Tail
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk
LDPlayer
Android Emulator in Computer (Option for smartphone)
Aptoid
Independent Android app store (Alternative to download Blynk App)
CP210x_Universal_Windows_Driver.zip
USB driver for NodeMCU V2 Amica version
CH340-Drivers-master.zip
USB driver for NodeMCU V2 Doit ESP12E (Narrow) version

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver
Tape, Double Sided
Tape, Double Sided

Story

Read more

Schematics

Controlled Robot Schematic

Code

WiFi_Car_Joystick

C/C++
Code for Joystick remote controller version
#define BLYNK_PRINT Serial 
#include  <ESP8266WiFi.h>
#include  <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App. 
// Go to the Project Settings (nut icon). 
char auth[] = "YourAuthToken"; 

// Your WiFi credentials. 
// Set password to "" for open networks. 
char ssid[] = "YourNetworkName"; 
char pass[] = "YourPassword"; 
 
int PWMA=5;//Right side 
int PWMB=4;//Left side 
int DA=0;//Right reverse 
int DB=2;//Left reverse 

void setup(){ 
 // Debug console 
 Serial.begin(9600); 
 Blynk.begin(auth, ssid, pass); 
 pinMode(PWMA, OUTPUT); 
 pinMode(PWMB, OUTPUT); 
 pinMode(DA, OUTPUT); 
 pinMode(DB, OUTPUT); 
} 

void loop(){ 
Blynk.run(); 
  
} 

// Handling Joystick data 
BLYNK_WRITE(V1){ 
int x = param[0].asInt(); 
int y = param[1].asInt();  

int leftWheel = y + x ;
int leftWheel2 = leftWheel/2 ;
int rightWheel = y - x ;
int rightWheel2 = rightWheel/2 ;

//Forward Left Wheel
if(leftWheel>0){        

    analogWrite(PWMA,leftWheel ); 
    digitalWrite(DA, HIGH); 
    
//Backward Left Wheel      
}else{        
     analogWrite(PWMA, abs(leftWheel)); 
     digitalWrite(DA, LOW);
}

//Forward 
if(rightWheel>0){
  analogWrite(PWMB,rightWheel ); 
  digitalWrite(DB,HIGH );
//Backward 
}else{
  analogWrite(PWMB,abs(rightWheel) ); 
  digitalWrite(DB,LOW );
}

} 

WiFi_Car_Keypad

C/C++
Code for Keypad remote control version
#define BLYNK_PRINT Serial 
#include  <ESP8266WiFi.h>
#include  <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App. 
// Go to the Project Settings (nut icon). 
char auth[] = "YourAuthToken"; 

// Your WiFi credentials. 
// Set password to "" for open networks. 
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword"; 

// Bridge widget on virtual pin 5
WidgetBridge bridge1(V5);

int PWMA=5;//Right side 
int PWMB=4;//Left side 
int DA=0;//Right reverse 
int DB=2;//Left reverse 
int engine = 0;

void setup(){ 
 // Debug console 
 Serial.begin(9600); 
 Blynk.begin(auth, ssid, pass); 
 pinMode(PWMA, OUTPUT); 
 pinMode(PWMB, OUTPUT); 
 pinMode(DA, OUTPUT); 
 pinMode(DB, OUTPUT); 
} 

void loop(){ 
Blynk.run(); 
  
} 

// Handling keypad button
 
BLYNK_WRITE(V1){ 


//Move Forward
int forward = param.asInt();

  digitalWrite(PWMA,forward ); 
  digitalWrite(DA, HIGH); 

  digitalWrite(PWMB,forward ); 
  digitalWrite(DB, HIGH); 

}

//Move Backward
BLYNK_WRITE(V2){ 

int reverse = param.asInt();

  digitalWrite(PWMA,reverse ); 
  digitalWrite(DA, LOW); 

  digitalWrite(PWMB,reverse); 
  digitalWrite(DB, LOW); 

}

//Turn Left
BLYNK_WRITE(V3){ 

int left = param.asInt();

  digitalWrite(PWMA,left ); 
  digitalWrite(DA, LOW); 

  digitalWrite(PWMB,left ); 
  digitalWrite(DB, HIGH); 

}

//Turn Right
BLYNK_WRITE(V4){ 

int right = param.asInt(); 

  digitalWrite(PWMA,right ); 
  digitalWrite(DA, HIGH); 
  

  digitalWrite(PWMB,right ); 
  digitalWrite(DB, LOW); 

}

Credits

CINTAA@Raub

CINTAA@Raub

0 projects • 0 followers
Centre of Innovation Tengku Ampuan Afzan (CINTAA), a makerspace located in Raub,Pahang Malaysia officially open in 2017.
Asyuwad Azmi

Asyuwad Azmi

0 projects • 0 followers
Forever Student and CINTAA Manager
Thanks to Andriyf1 and Tony Kambourakis.

Comments

Add projectSign up / Login