Shobhit Kumawat
Published

Voice Controlled Wireless ROBOT CAR

Control this robot car from anywhere in world using internet via Google Assistant or Webapp

IntermediateFull instructions provided3 hours2,387
Voice Controlled Wireless ROBOT CAR

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Arduino UNO
Arduino UNO
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
Robot Car Chassis Kit
×1
9V battery (generic)
9V battery (generic)
×1
9V Battery Clip
9V Battery Clip
×1
Jumper wires (generic)
Jumper wires (generic)
×1
9v clip cable for arduino
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Arduino IDE
Arduino IDE
Maker service
IFTTT Maker service

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

Circuit Diagram

Code

Arduino code

Arduino
We have to upload this code to arduino board
#include <BoltIoT-Arduino-Helper.h>
# define left1    7 
# define left2    8 
# define right1   9 
# define right2   10 
String command = "";
String forward(String *data)
{
  command = "FORWARD";
  digitalWrite(left1,HIGH);
  digitalWrite(left2,LOW);
  digitalWrite(right1,LOW);
  digitalWrite(right2,HIGH);
  return "Success:Forward";
}

String backward(String *data)
{
  command = "BACKWARD";
  digitalWrite(left1,LOW);
  digitalWrite(left2,HIGH);
  digitalWrite(right1,HIGH);
  digitalWrite(right2,LOW);
  return "Success:Backward";
}

String right(String *data)
{
  command = "RIGHT";
   digitalWrite(left1,HIGH);
  digitalWrite(left2,LOW);
  digitalWrite(right1,HIGH);
  digitalWrite(right2,LOW);
  delay(300);
  digitalWrite(left2,LOW);
  digitalWrite(left1,LOW);
  digitalWrite(right1,LOW);
  digitalWrite(right2,LOW);
  return "Success:Right";
  }

String left(String *data) 
{
  command = "LEFT";
   digitalWrite(left1,LOW);
  digitalWrite(left2,HIGH);
  digitalWrite(right1,LOW);
  digitalWrite(right2,HIGH);
  delay(300);
  digitalWrite(left2,LOW);
  digitalWrite(left1,LOW);
  digitalWrite(right1,LOW);
  digitalWrite(right2,LOW);
  return "Success:Left";
}

String stopit(String *data)
{
  digitalWrite(left2,LOW);
  digitalWrite(left1,LOW);
  digitalWrite(right1,LOW);
  digitalWrite(right2,LOW);
  return "Success:Stop";
}

void setup()
{
  pinMode(left1,OUTPUT);
  pinMode(left2,OUTPUT);
  pinMode(right1,OUTPUT);
  pinMode(right2,OUTPUT);
  boltiot.begin(Serial);
  Serial.begin(9600);
  boltiot.setCommandString("FORWARD",forward);
  boltiot.setCommandString("BACKWARD",backward);
  boltiot.setCommandString("LEFT",left);
  boltiot.setCommandString("RIGHT",right);
  boltiot.setCommandString("STOP",stopit);
}

void loop()
{
  boltiot.handleCommand();
}

Creating trigger URL's

Plain text
https://cloud.boltiot.com/remote/your_api/serialWrite?data=STOP&deviceName=BOLTXXXXXX

https://cloud.boltiot.com/remote/your_api/serialWrite?data=BACKWARD&deviceName=BOLTXXXXXX

https://cloud.boltiot.com/remote/your_api/serialWrite?data=FORWARD&deviceName=BOLTXXXXXX

https://cloud.boltiot.com/remote/your_api/serialWrite?data=LEFT&deviceName=BOLTXXXXXX

https://cloud.boltiot.com/remote/your_api/serialWrite?data=RIGHT&deviceName=BOLTXXXXXX

Credits

Shobhit Kumawat

Shobhit Kumawat

2 projects • 1 follower

Comments