Hello guys,
In this Article, I will tell you “How I Made a Voice controlled Car”.
It was the sexiest robot which I made this robot listen to voice commands!!!!!. Oh Yeah, you read it right!
Let’s start it, DUDE…. 🙂
Step 1:-
PARTS WE NEED
1.1xArduino UNO
2.2xCaster wheel
3.2x Geared Motors
4.Motor Driver (I used L298N)
5.Bluetooth Module
6.12v Battery
- Breadboard
- Jumper wires
- Chassis
- A can of beer to celebrate
Step 2:-
CONNECTION
Connect Them Together As Shown Above
Step 3:-
PROGRAMMING
UPLOAD THIS CODE TO YOUR ARDUINO BOARD
CODE
#include <SoftwareSerial.h>
SoftwareSerial BT(10, 11); //TX, RX respetively
String readvoice;
void setup() {
BT.begin(9600);
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(4, OUTPUT);
pinMode(3, OUTPUT);
pinMode(7, OUTPUT);
}
//———————————————————————–//
void loop() {
while (BT.available()){ //Check if there is an available byte to read
delay(10); //Delay added to make thing stable
char c = BT.read(); //Conduct a serial read
readvoice += c; //build the string- “forward”, “reverse”, “left” and “right”
}
if (readvoice.length() > 0) {
Serial.println(readvoice);
if(readvoice == “go”)
{
digitalWrite(8, HIGH);
digitalWrite (4, HIGH);
digitalWrite(3,LOW);
digitalWrite(7,LOW);
delay(100);
}
else if(readvoice == “back”)
{
digitalWrite(8, LOW);
digitalWrite(4, LOW);
digitalWrite(3, HIGH);
digitalWrite(7,HIGH);
delay(100);
}
else if (readvoice == “up”)
{
digitalWrite (8,HIGH);
digitalWrite (4,LOW);
digitalWrite (3,LOW);
digitalWrite (7,LOW);
delay (100);
}
else if ( readvoice == “on”)
{
digitalWrite (8, LOW);
digitalWrite (4, HIGH);
digitalWrite (3, LOW);
digitalWrite (7, LOW);
delay (100);
}
else if (readvoice == “hello”)
{
digitalWrite (8, LOW);
digitalWrite (4, LOW);
digitalWrite (3, LOW);
digitalWrite (7, LOW);
delay (100);
}
readvoice=””;}} //Reset the variable
STEP 4:-
Download the app
AMR voice from play store
Step 5:-
Pair your phone to the module
Step 6:-
Open the App
Step 7:-
Connect to Bluetooth module
Step 8:-
Give Commands
Step 9:-
Enjoy