Skip to main content

SMARTPHONE CONTROLLED ARDUINO ROBOTIC CAR -COMPLETE GUIDE | ARDUINO PROJECTS







Hello everyone. Today, in this post we will discuss about How to make a Bluetooth Controlled Arduino Robotic Car. The car will be controlled by a bluetooth module interfaced with Arduino Mega, and will receive signal from the bluetooth of a smartphone using bluetooth serial monitor app.



List of Components:

1. Arduino Mega

2. Robot Chassis

3. Wheels.

4. Castor Wheel.

5. Motor Driver.

6. Bluetooth Module HC-05

7. LiPo Battery

8. Connecting Wires.

9. SmartPhone.



Arduino Code:



#include <SoftwareSerial.h>



SoftwareSerial bt(10,11); // assigning 10 as RX and 11 as TX



#define motor_left 5    // PWM PINS FOR LEFT MOTOR

#define motor_right 3   // PWM PIN FOR RIGHT MOTOR



#define motor_right_dir 2  // DIRECTION PIN FOR RIGHT MOTOR

#define motor_left_dir 4   // DIRECTION PIN FOR LEFT MOTOR





void setup()

{

  pinMode(2,OUTPUT);

  pinMode(4,OUTPUT);

  pinMode(3,OUTPUT);

  pinMode(5,OUTPUT);



  while(!Serial)        // waiting for serial communication to setup.

  {;}



  bt.begin(9600);   // beginning the bluetooth connection.

  }



void loop()

{



  bt.listen();



  while(bt.available())   // loop continues until input is received.

  {

   

    char ch= bt.read();   // read the input one character at a time.

 

    if(ch=='f')

    {                         // MOVES FORWARD IF INPUT RECEIVED IS 'F'

      digitalWrite(motor_left_dir,HIGH);

      digitalWrite(motor_right_dir,HIGH);

      analogWrite(motor_left,150);

      analogWrite(motor_right,150);

     // delay(100);

      }



      else if(ch=='b')

      {

       digitalWrite(motor_left_dir,LOW);

      digitalWrite(motor_right_dir,LOW);

      analogWrite(motor_left,150);

      analogWrite(motor_right,150);

      }

      else if(ch=='l')

      {

        digitalWrite(motor_left_dir,HIGH);

      digitalWrite(motor_right_dir,HIGH);

      analogWrite(motor_left,0);

      analogWrite(motor_right,120);

        }

        else if(ch=='r')

        {

      digitalWrite(motor_left_dir,HIGH);

      digitalWrite(motor_right_dir,HIGH);

      analogWrite(motor_left,120);

      analogWrite(motor_right,0);

          }



        else if(ch=='s')

        {

      digitalWrite(motor_left_dir,HIGH);

      digitalWrite(motor_right_dir,HIGH);

      analogWrite(motor_left,0);

      analogWrite(motor_right,0);

          }

   

  }



  }// thanks for viewing. PLEASE SUBSCRIBE CHANNEL.





Connections:



For connection, please watch the complete video.



Thanks for reading the post. Hope you will enjoy making the project yourself. Thanks and Happy Learning.

Comments

Popular posts from this blog

HOW TO MAKE A ROBOTIC BIRD | FLAPPING MECHANISM | GEARBOX DESIGN | ORNIT...

The following video aims at designing the flapping wing mechanism for a robotic bird (Ornithopter). The robotic bird can be controlled with a Remote Control. The design is made in solidworks software and the motion study of the mechanism is also done on the same software.

��HOW TO INTERFACE IR SENSOR WITH ARDUINO | VISITOR COUNTER | ARDUINO TUT...

(via  https://www.youtube.com/watch?v=lkbPh8IV1t HELLO EVERYONE. TODAY WE WILL LEARN HOW TO INTERFACE IR SENSOR WITH ARDUINO AND HOW TO MAKE VISITOR COUNTER WITH IT.  TO START WITH, AN IR SENSOR HAS 3 PINS, NAMELY FOR VCC, GND, AND DATA. THROUGH THE DATA PIN, WE TAKE IN THE INPUT AND DETECT WHETHER THESE IS SOME OBSTACLE IN FRONT OR NOT. IR SENSOR WORKS ON THE PRINCIPLE OF REFLECTION OF LIGHT WAVES. BY USING THE DIGITAL READ FUNCTION, WE CAN READ THE VALUE OF INPUT TO BE 1 OR 0, AND DO COMPUTATION ACCORDINGLY. TO MAKE THE PROJECT THE COMPONENTS REQUIRED ARE: 1. ARDUINO 2. LCD MODULE. 3. IR SENSOR MODULE. 4. BREAD BOARD. 5. POTENTIOMETER. 6. RESISTORS. 7. CONNECTING WIRES. CONNECTIONS: FOR LCD CONNECTION, YOU CAN VISIT MY PREVIOUS VIDEO AT:  https://youtu.be/Li-ZkPfosvE NOW CONNECT THE DATA PIN OF THE IR SENSOR TO THE ANALOG PIN A0, OF THE ARDUINO. NOW YOU CAN PERFORM BOTH DIGITAL AND ANALOG READ FUNCTION ON THIS PIN, DEPENDING UPON YO...

��HOW TO MAKE DOOR LOCK SYSTEM USING ARDUINO | ARDUINO TUTORIALS | INTERF...

HELLO EVERYONE, TODAY WE WILL LEARN HOW TO MAKE A DOOR LOCK SYSTEM USING ARDUINO, KEYPAD, LCD, AND A SERVO MOTOR. TO BEGIN WITH, LET'S HAVE A LIST OF COMPONENTS THAT WE REQUIRE FOR THIS PROJECT: 1. ARDUINO MEGA. 2. LCD MODULE. 3. KEYPAD MODULE. 4. BUZZER. 5. RGB LED. 6. BREADBOARD. 7. CONNECTING WIRES. 8. RESISTORS. 9. POTENTIOMETER. ONCE, THE COMPONENTS ARE COLLECTED, WE NEED TO SETUP THE CIRCUIT, AS PER THE SCHEMATICS GIVEN IN THE VIDEO. ALSO YOU CAN SETUP INDIVIDUAL COMPONENTS LIKE 1. LCD: https://youtu.be/Li-ZkPfosvE 2. KEYPAD: https://youtu.be/nex5usOycSM 3. RGB LED: https://youtu.be/NLr56HLcWWk 4. SERVO MOTORS BY VISITING THE CORRESPONDING LINKS GIVEN ABOVE. AFTER THE CIRCUIT IS COMPLETE, YOU NEED TO UPLOAD THE CODE: #include<Keypad.h> // KEYPAD LIBRARY FOR KEYPAD INTERFACING #include<LiquidCrystal.h> // LIBRARY FOR LCD INTERFACING #include<Servo.h>// LIBRARY FOR SERVO MOTOR //#include<String.h> #define buzzer 10 // DEFININ...