Bluetooth Controlled Robot

by Ajay Singh in Circuits > Arduino

2773 Views, 15 Favorites, 0 Comments

Bluetooth Controlled Robot

IMG_20170727_155623_1.jpg

hi

i am ajay i would tell you how to make your own app as well as your mobile app in a very easy way.

so i will first tell you how to make your own app

How to Make a Bluetooth Control Robot App Using Mit App Inventor 2

RoboGear Episode 2 APP DESIGN BLUETOOTH ROBOT

hi

To make your own app you just need a gmail address to log in and follow the video i have connected

shortcut: you can download from gallary ,search"robogear " app in mit gallary app.

Part Require to Make It.

IMG_20170724_194127.jpg
IMG_20170727_155623_1.jpg
IMG_20170726_234610.jpg
IMG_20170726_234118.jpg

hi

the parts you require is

1.arduino

2.l293d

3.pcb

4 ic 7805

5 hc 05

6 1000uf/25v capacitor

7 4pc bo2 dc motor+wheel

8 foam sheet

9 soldering iron

10 drilling machine

The Whole Process How You Will Make It.

Episode 3 bluetooth controlled robot hardware

hi

here is a video how you can make the whole robot.

The Arduino Code

hi

i am pasting the whole code here you can copy and paste in your arudino .

if motor is moving reverse just change the pin no in first 4 lines of code.

------------------------------------------------------------x---------------------------------------------------------------

#define LMP 2

#define LMN 4

#define RMP 7

#define RMN 5

int firstSensor = 0; // first analog sensor

int secondSensor = 0; // second analog sensor

int thirdSensor = 0; // digital sensor

int inByte = 0; // incoming serial byte

char BYTE;

boolean status_unlock;

boolean status_bluetooth;

long interval = 1000; // interval at which to blink (milliseconds)

long previousMillis = 0; // will store last time LED was update

int minite,sec;

void setup()

{

// start serial port at 9600 bps:

Serial.begin(9600);

//pinMode(2, INPUT); // digital sensor is on digital pin 2

establishContact(); // send a byte to establish contact until receiver responds

pinMode(LMP, OUTPUT);

pinMode(LMN, OUTPUT);

pinMode(RMP, OUTPUT);

pinMode(RMN, OUTPUT);

digitalWrite(LMP, LOW); // switch off MOTOR

digitalWrite(LMN, LOW); // switch off MOTOR

digitalWrite(RMP, LOW); // switch off MOTOR

digitalWrite(RMN, LOW); // switch off MOTOR

status_bluetooth = true;

status_unlock = false;

sec = 0;

}

void loop()

{

if (Serial.available() > 0)

{

inByte = Serial.read(); // get incoming byte:

if(inByte == 'A')

{

digitalWrite(LMP, HIGH);

digitalWrite(LMN, LOW);

digitalWrite(RMP, HIGH);

digitalWrite(RMN, LOW);

inByte = 0;

}

if(inByte == 'B')

{

digitalWrite(LMP, LOW);

digitalWrite(LMN, HIGH);

digitalWrite(RMP, LOW);

digitalWrite(RMN, HIGH);

inByte = 0;

}

if(inByte == 'D')

{

digitalWrite(LMP, HIGH);

digitalWrite(LMN, LOW);

digitalWrite(RMP, LOW);

digitalWrite(RMN, LOW);

inByte = 0;

}

if(inByte == 'C')

{

digitalWrite(LMP, LOW);

digitalWrite(LMN, LOW);

digitalWrite(RMP, HIGH);

digitalWrite(RMN, LOW);

Serial.print('D', BYTE);

inByte = 0;

}

if(inByte == 'E')

{

digitalWrite(LMP, LOW);

digitalWrite(LMN, LOW);

digitalWrite(RMP, LOW);

digitalWrite(RMN, LOW);

Serial.print('E', BYTE);

inByte = 0;

}

if(inByte == 'G')

{

digitalWrite(LMP, HIGH);

digitalWrite(LMN, LOW);

digitalWrite(RMP, LOW);

digitalWrite(RMN, HIGH);

inByte = 0;

}

if(inByte == 'F'){

digitalWrite(LMP, LOW);

digitalWrite(LMN, HIGH);

digitalWrite(RMP, HIGH);

digitalWrite(RMN, LOW);

Serial.print('G', BYTE);

inByte = 0;

}

if(inByte == 'S'){

Serial.print('S', BYTE); // send a char

status_bluetooth = true;

sec = 0;

}

} // if(Serial

/*

unsigned long currentMillis = millis();

if(currentMillis - previousMillis > interval) {

previousMillis = currentMillis; // save the last time you blinked the LED

sec++;

if(status_unlock==true){

if(sec== 11){

digitalWrite(LED_PIN1, HIGH); // switch on LED

delay(800);

digitalWrite(LED_PIN1, LOW); // switch off LED

status_unlock = false;

sec = 0;

}

}

else sec = 0;

}

*/

} //Loop

void establishContact() {

while (Serial.available() <= 0) {

Serial.print('.', BYTE); // send a capital A

delay(500);

}

}