LOGIN
Ekhtiak Efat
4
Collaborator
Student (Project Leader)
 · PabnaBangladesh
Share
Report
Get Link
TASK
Open
Reward › Contributions
Estimated Duration › 2 weeks

Code Something New for Voice Controlled robot Car

Can you code something new in arduino for the voice controlled robot car? Lets show your skill and creativity. Code something new in arduino language.

You can find the existing code in the making tutorial post in the project page. Also the pin connection and circuit diagram is give. Lets bring it on. I will test the code in the bot and post a working view video. Lets do it together

Android
Arduino
Electronics
Robotics
Software
Contributions
Ekhtiak Efat

Added some new features and continuous operation mode

3 likes 
Like
Award Contribution
Load 2 previous comments
Ekhtiak Efat
4
Collaborator
Student (Project Leader)
 · PabnaBangladesh
Share
Report
Get Link

in the example code there is the communication part, its easy. the upper part before if(rS==… is the communication part. its easy

Like
0 like 
Award Contribution
Ekhtiak Efat
4
Collaborator
Student (Project Leader)
 · PabnaBangladesh
Share
Report
Get Link

New Arduino Code for the Voice Controlled Robot Car. It is for continuous speed and has a turn back and stop function added. Working View video will be uploaded soon

//DISCONNECT THE BLUETOOTH MODULE BEFORE UPLOADING THE CODE TO ARDUINO
//COPYRIGHT OF DIRTY PROJECTS - YOUTUBE CHANNEL
// ASSIGNING MOTOR DRIVER PINS TO ARDUINO PINS
//INTERCHANGE 5 & 6 IF MOTOR A OR LEFT MOTOR ROTATES WRONGLY
//INTERCHANGE 7 & 8 IF MOTOR B OR RIGHT MOTOR ROTATES WRONGLY
const int IN1 = 5; //FORWARD PIN FOR MOTOR A OR LEFT MOTOR
const int IN2 = 6; //BACKWARD PIN FOR MOTOR A OR LEFT MOTOR
const int IN3 = 7; //FORWARD PIN FOR MOTOR B OR RIGHT MOTOR
const int IN4 = 8; //BACKWARD PIN FOR MOTOR B OR RIGHT MOTOR
const int ENA = 9; //MUST BE A PWM PIN TO CONTROLL SPEED OF MOTOR A
const int ENB = 10; //MUST BE A PWM PIN TO CONTROLL SPEED OF MOTOR B
const int TM = 450; //DELAY TIME INTERVAL
const int sP = 100 ; //SPEED OF MOTOR IN THE RANGE OF 0 TO 255
String rS; //WORD OR DIRECTION VARIABLE TO BE RECEIVED FROM BLUETOOTH MODULE
int rR = 1; //NEEDED FOR ROTATION DIRECTION IN THE CASE OF ROUND COMMAND
int sT = 0; //FOR MAKING DOUBLE BACK AS STOP

void setup() {
  Serial.begin(9600);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(ENB, OUTPUT);


}

void loop() {
  analogWrite(ENA, sP);
  analogWrite(ENB, sP);
  rS = ""; //CLEARING THE VARIABLE FOR NEW INPUT
  while (Serial.available()) {
    delay(10);  //small delay to allow input buffer to fill

    char c = Serial.read();  //gets one byte from serial buffer
    if (c == ',') {
      break;
    }  //breaks out of capture loop to print rS
    rS += c;
  } //makes the string rS
  rS.toLowerCase(); //MAKING rS LOWER CASE
  if (rS.length() > 0) {
    Serial.println(rS);
    //FOR FORWARD
    if (rS == "1" || rS == "so do i" || rS == "rod" || rS == "for what" || rS == "pride" || rS == "roar" || rS == "fluoride" || rS == "or large" || rS == "call world" || rS == "call rod" || rS == "ordered" ||  rS == "forward" || rS == "call art" || rS == "photo id" || rS == "for work" || rS == "what do i do" || rS == "how do i" || rS == "water wired" || rS == "not tired" || rS == "call reward" || rS == "call o.r" || rS == "for a large" || rS == "so tired" || rS == "for a wired" || rS == "call wired" || rS == "for a white" || rS == "for the wired" || rS == "call dad" || rS == "out of liar" || rS == "call dart" || rS == "call reward" || rS == "photo on" || rS == "how to wire" || rS == "what tired" || rS == "auto art" || rS == "but tired" || rS == "auto wash" || rS == "set alarm" || rS == "for required" || rS == "400 on" || rS == "walmart" || rS == "for a while" || rS == "call award" || rS == "paul tired" || rS == "call iron" || rS == "auto world" || rS == "auto on" || rS == "call ward"  || rS == "for word" || rS == "call yard" || rS == "call o.r" || rS == "for a large" || rS == "so tired" || rS == "for a wired" || rS == "call wired" || rS == "for a white" || rS == "for the wired" || rS == "call dad" || rS == "out of liar" || rS == "call dart" || rS == "call reward" || rS == "photo on" || rS == "how to wire" || rS == "what tired" || rS == "auto art" || rS == "but tired" || rS == "auto wash" || rS == "set alarm" || rS == "for required" || rS == "400 on" || rS == "walmart" || rS == "for a while" || rS == "call award" || rS == "paul tired" || rS == "call iron" || rS == "auto world" || rS == "auto on" || rS == "call ward"  || rS == "for word" || rS == "or wire"   || rS == "call o.r" || rS == "for a large" || rS == "so tired" || rS == "for a wired" || rS == "call wired" || rS == "for a white" || rS == "for the wired" || rS == "call dad" || rS == "out of liar" || rS == "call dart" || rS == "call reward" || rS == "photo on" || rS == "how to wire" || rS == "what tired" || rS == "auto art" || rS == "but tired" || rS == "auto wash" || rS == "set alarm" || rS == "for required" || rS == "400 on" || rS == "walmart" || rS == "for a while" || rS == "call award" || rS == "paul tired" || rS == "call iron" || rS == "auto world" || rS == "auto on" || rS == "call ward"  || rS == "for word" || rS == "for ward" )
    {
      digitalWrite(IN2, LOW);
      digitalWrite(IN4, LOW);
      sT = 1;
      digitalWrite(IN1, HIGH);
      digitalWrite(IN3, HIGH);
      while (!Serial.available());

    }
    //FOR BACKWARD
    else if (rS == "2" || rS == "back" || rS == "bag" || rS == "beck" || rS == "mac" || rS == "a" || rS == "heck" || rS == "hack")
    { digitalWrite(IN1, LOW);
      digitalWrite(IN3, LOW);
      if (sT != 2) {
        sT = 2;
        digitalWrite(IN2, HIGH);
        digitalWrite(IN4, HIGH);
        while (!Serial.available());
      }
      else {
        sT = 0;
        digitalWrite(IN2, LOW);
        digitalWrite(IN4, LOW);
        while (!Serial.available());

      }
    }
    //FOR LEFT
    else if (rS == "4" || rS == "left" || rS == "dave" || rS == "yeah" || rS == "latest" || rS == "hey" || rS == "if")
    {
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, LOW);
      digitalWrite(IN4, LOW);
      digitalWrite(IN3, HIGH);
      delay(TM);
      digitalWrite(IN1, HIGH);
      while (!Serial.available());

    }
    //FOR RIGHT
    else if (rS == "3" || rS == "diet" || rS == "tight" || rS == "rice" || rS == "would i" || rS == "tonight" || rS == "write" || rS == "wright" || rS == "right" || rS == "at" || rS == "night" || rS == "alright" || rS == "light" || rS == "bright" || rS == "aight" || rS == "livr" || rS == "died" || rS == "that" || rS == "rides" || rS == "drives")
    {
      digitalWrite(IN2, LOW);
      digitalWrite(IN3, LOW);
      digitalWrite(IN4, LOW);
      digitalWrite(IN1, HIGH);
      delay(TM);
      digitalWrite(IN3, HIGH);
      while (!Serial.available());
    }
    //FOR DOING A ROUND CIRCLE
    else if ( rS == "round" || rS == "sound" || rS == "brown" || rS == "don\'t" || rS == "robin" || rS == "around" || rS == "ground" || rS == "hi" || rS == "silent" || rS == "violent" || rS == "down" || rS == "island" || rS == "land" || rS == "and" || rS == "all" || rS == "found" || rS == "bound" || rS == "band")
    { if (rR == 1)
      {
        digitalWrite(IN2, LOW);
        digitalWrite(IN3, LOW);
        digitalWrite(IN4, LOW);
        digitalWrite(IN1, HIGH);
        rR = 2;
        while (!Serial.available());
      }
      else
      {
        digitalWrite(IN3, HIGH);
        digitalWrite(IN1, LOW);
        digitalWrite(IN2, LOW);
        digitalWrite(IN4, LOW);
        rR = 1;
        while (!Serial.available());
      }
    }
    //FOR MAKING THE FRONTSIDE TO TURN BACK
    else if (rS == "5" || rS == "turn back" || rS == "darn back" || rS == "i\'m back" || rS == "don back" || rS == "i\'m")
    {
      digitalWrite(IN1, HIGH);
      digitalWrite(IN4, HIGH);
      digitalWrite(IN3, LOW);
      digitalWrite(IN2, LOW);
      delay(TM);
      digitalWrite(IN4, LOW);
      digitalWrite(IN3, HIGH);
       while (!Serial.available());
          }
          //TO STOP THE CAR
    else if (rS == "6" || rS == "stop" || rS == "you stop" || rS == "he stopped" || rS == "stopped" || rS == "what\'s up" || rS == "the" || rS == "is top" || rS == "now" || rS == "how" || rS == "step")
    {
      digitalWrite(IN1, LOW);
      digitalWrite(IN2, LOW);
      digitalWrite(IN3, LOW);
      digitalWrite(IN4, LOW);
       while (!Serial.available());
 
    }
  }
}

Contribution

Added some new features and continuous operation mode

Like
0 like 
Award Contribution
Steven Reubenstone
34
Community Expert
Mechanical Engineer & Tinkerer of Things.
 · New YorkU.S.
Share
Report
Get Link

great work

Like
1 like 
Award Contribution
Ekhtiak Efat
4
Collaborator
Student (Project Leader)
 · PabnaBangladesh
Share
Report
Get Link

Steven Reubenstone thank you 😃

Like
0 like 
Award Contribution
Areous Ahmadtj
36
Community Expert
student
 · JosNigeria
Share
Report
Get Link

Jibin Lukose have you seen this. can you help with that

Like
2 likes 
Award Contribution
Jibin Lukose
17
Mastermind
Student
 · ThrissurIndia
Share
Report
Get Link

Areous Ahmadtj , Problem is I got access to Bluetooth Module, but I don’t have a Phone to interface and run 😄 .
I had done similar with basics on Voice controlled home automation 😃

Like
1 like 
Award Contribution
APPLY
LEAVE A REPLY
DISCOVER
CHAT
ALERTS
DISCUSSIONS
FEED
New Post
Facebook Share
Share Link
Help