LOGIN
Voice Controlled Robot Using Arduino
Voice controlled robot using arduino and bluetooth module using Android
Mujadid Ali
1
Student
·
STATUS

My Working..

#include<SoftwareSerial.h>


int MotorR1 = 5;
int MotorR2 = 6;
int MotorL3 = 7;
int MotorL4 = 8;
int MotorRENA = 9;
int MotorLENB = 10;
int Time = 450;
int Speed = 150;

char Command ;


void setup() {
  // put your setup code here, to run once:

  Serial.begin(9600);


  pinMode(MotorR1, OUTPUT);
  pinMode(MotorR2, OUTPUT);
  pinMode(MotorL3, OUTPUT);
  pinMode(MotorL4, OUTPUT);
  pinMode(MotorRENA, OUTPUT);
  pinMode(MotorLENB, OUTPUT);
 

}

void loop() {
  // put your main code here, to run repeatedly:

  //Setting the motors speeds
  analogWrite(MotorRENA, Speed);
  analogWrite(MotorLENB, Speed);



 

  if(Serial.available())
  {
    Command = Serial.read();

   Serial.println("The Received Command");
   Serial.println(Command); 
  }

  if(Command == '1')
  {
    Serial.println("Enter in forward");
    digitalWrite(MotorR1, HIGH);
    digitalWrite(MotorL3, HIGH);
    delay(Time);
    digitalWrite(MotorR1, LOW);
    digitalWrite(MotorL3, LOW);
    Serial.println("Exit From forward");
  }else if(Command == '2')
  {
    digitalWrite(MotorR2, HIGH);
    digitalWrite(MotorL4, HIGH);
    delay(Time);
    digitalWrite(MotorR2, LOW);
    digitalWrite(MotorL4, LOW);
  }else if(Command == '3')
  {
    digitalWrite(MotorR1, HIGH);
    delay(Time);
    digitalWrite(MotorR1, LOW);
  }else if(Command == '4')
  {
    digitalWrite(MotorL3, HIGH);
    delay(Time);
    digitalWrite(MotorL3, LOW);
  }else if(Command == '5');
  {
    digitalWrite(MotorR1, LOW);
    digitalWrite(MotorL3, LOW);
    digitalWrite(MotorR2, LOW);
    digitalWrite(MotorL4, LOW);
  }

  delay(1000);

}
Contributions
Mujadid Ali

Gave a new working code 👏👌👏

5 likes
Like
Award Contribution
Load previous comments
Vinayak Jaid
0
Mechanical Engineer
· Mumbai, Maharashtra, India

i already had made voice controlled robot , you can check it on youtube -https://youtu.be/Ff0poI3Qh_o
if you stuck somewhere in coding or no response from arduino then you can messege me i’ll surely help you.

Like
Award Contribution
Abubakar Palladan
0
student
· Zaria, Kaduna, Nigeria

nice

Like
Award Contribution
WaQar Ahmed
0
student (Engineer)
· Khuzdar, Balochistan, Pakistan

please Guide me in Wall climbing Robot

Like
Award Contribution
Leave a reply...
DISCOVER
CHAT
HIRE
ACTIVITY
FEED
Chat with us!
Help
Write something before you submit it!
Photo updated
Request Sent!
Updated
Copied to Clipboard