ARDUINO Bluetooth Servo Control With My New ANDROID APP

Please watch the video below for a description & tutorial of how to build and use this project:

Check us out on Facebook!

The APP:

screenshot_2016-11-02-14-48-02

Click here to download the free APP:

The Circuit:

bt_servo

PARTS LIST:

affiliate links:

ARDUINO Board

HC-06 BLUETOOTH Board

Servo’s

5K resistor

10K resistor

Jumper Wires

Circuit Board or Bread Board

5 Volt regulator (optional)

The ARDUINO sketch:

Click here to down load the sketch or just copy and past the text below into your ARDUINO ide.

#include <Servo.h>

Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;
Servo servo6;
void setup() {
Serial.begin(9600);
servo1.attach(11); //servo 1
servo1.write(90);
servo2.attach(10); //servo 2
servo2.write(90);
servo3.attach(9); //servo 3
servo3.write(90);
servo4.attach(6); //servo 4
servo4.write(90);
servo5.attach(5); //servo 5
servo5.write(90);
servo6.attach(3); //servo 6
servo6.write(90);
}

void loop() {
if (Serial.available() >= 2 )
{
unsigned int a = Serial.read();
unsigned int b = Serial.read();
unsigned int val = (b * 256) + a;
if (val >= 0 && val <= 180) // servo 1
{
servo1.write(val);
}
else if (val >= 1000 && val <= 1180) // servo 2
{
servo2.write(val-1000);
}
else if (val >= 2000 && val <= 2180) // servo 3
{
servo3.write(val-2000);
}
else if (val >= 3000 && val <= 3180) // servo 4
{
servo4.write(val-3000);
}
else if (val >= 4000 && val <= 4180) // servo 5
{
servo5.write(val-4000);
}
else if (val >= 5000 && val <= 5180) // servo 6
{
servo6.write(val-5000);
}
}

}