Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Speech recognition arduino car

Status
Not open for further replies.

Aleena001

New Member
I want someone to give me a few answers as I am making my FYP and according to that I would want my car to move forwards for a few seconds then turn right and continue moving for another few seconds and then stop. So all of this should happen on speech command "one" so can I know how to form this in arduino sketch?
 
As Ian Rogers said, you need a module to connect to your Arduino Uno. There are a number of speech modules available. Your coding on the Arduino is going to depend on the module that you use.

Here are two other modules:



We can't answer specific questions about coding on the Arduino without you telling us what speech recognition module that you will be using. You can, however, read about how the modules work, including the coding to use them with an Arduino without having the module.
 
See I am using H bridge, Arduino Uno and a Bluetooth which will transfer the voice command from mobile to arduino and the motor driver(H bridge) will run motors..... according
 
ok. Tell us about the bluetooth part. Are you speaking into a phone and have a bluetooth speaker on the car?
 
Yes I speak on my phone in an app using the google API so that voice is transfered to Bluetooth module on car chasia
 
Screenshot_20200105-212754.png
 
I habe done following effort.

#include <SoftwareSerial.h>

SoftwareSerial BT(10, 11); //TX, RX respetively
String readvoice;

void setup() {
BT.begin(9600);
Serial.begin(9600);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, 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);
delay(100);

if(readvoice == "forward")
{
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);
}

else if(readvoice == "reverse")
{
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
digitalWrite(6,HIGH);
delay(100);
}

else if (readvoice == "right")
{
digitalWrite (3,HIGH);
digitalWrite (4,LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay (100);

}

else if ( readvoice == "left")
{
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}

else if (readvoice == "stop")
{
digitalWrite (3, LOW);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}
readvoice="";}} //Reset the variable
 
This statement in your listing - BT.begin(9600); shows me that you are trying to use a library on your Arduino. What is the name of that library? Can you provide a link to that library?

Edit: also, please define "Bluetooth module on car".

The more you tell us up front, the better.
 
Its HC-05 Bluetooth module and it gets connected easily the wheels moves forward when I give "forward" command but I want the functions as mentions should move a few seconds then right for dew seconds then should stop...
 
I want to run this robot chassis car for a predefined time in particular directions.
 

Attachments

  • Screenshot_20200105-221017.png
    Screenshot_20200105-221017.png
    1.1 MB · Views: 214
This statement in your listing - BT begin(9600); shows me that you are trying to use a library on your Arduino. What is the name of that library? Can you provide a link to that library?

Edit: also, please define "Bluetooth module on car".
The more you tell us up front, the better.


So BT.begin(9600); is a sort of function statement and works using software serial lines mentioned above in the code
 
Ok basically half of my thing is ready.
As when I give the command "forward" the wheels move forwards using the function


if(readvoice == "forward")
{
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);

}
But at the same time I want to move forward for 4 seconds then move right for 2 seconds then wheels should stop.
So all the functions are defined in code for moving forward, reverse,right or left but I want to combine them that is actually what I wanted to ask
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top