Arduino/Android - BLUETOOTH Multi Servo Motor Control Android APP

Introduction: Arduino/Android - BLUETOOTH Multi Servo Motor Control Android APP

About: Hello world! I make simple & Advanced projects for people who want to learn programming and electronics. Most of my Instructables are about arduino and the wide range of sensors you can use with it. I ma...

Hello world! I made a 1 servo control app yesterday and i said that i would make a multi control, so here is the multi control app! I also made a better arduino code. Follow the next step for the schematic, code, parts list & APP

GET THE APP ON GOOGLE PLAY

Contact me if you want the source code!

Step 1: Schematic, Code & Parts List.

Connect everything like the schematic, Upload the code, download the app, connect bluetooth after pairing the devices and it should work. Make sure to connect RXD to TX and TXD to RX.

Also make sure not to have the bluetooth connected when uploading the code!

Parts list.

  1. Arduino uno, (Use a mega if you want to use more then 6 Servos!) i used the RobotDyn Uno.
  2. HC-06 Bluetooth module, or any other.
  3. 6 x Servo motor. (Can test with one to of course)
  4. Jumper wires set MM/FF/MF
  5. Android phone.

Good luck!

Follow the next step to find out how to change your bluetooth module its name, pin & baud rate.(optional)

Step 2: How to Change the Name of Your HC-06

What is needed?

1 x USB to TTL microcontroller programmer to connect to your HC-06

How to connect the Programmer?

VCC to VCC

GND to GND

RXD to TX

TXD to RX

Lets get started...

  1. connect the USB TTL programmer to the HC-06
  2. Plug in the USB and open up The Arduino IDE
  3. Open the serial monitor.
  4. Type "AT" without quotes. You should see a respond in the Serial monitor saying "OK"
  5. Type "AT+NAMExyz" Sets the module name to “xyz” (Replace xyz with the name you want.) response should be OKsetname.
  6. Type "AT+PIN1234" Sets the pin to 1234 (replace 1234 with your desired pin) respond should be OKsetPIN For more info on changing baudrate etc. i included a PDF file. Good luck!

Share

    Recommendations

    • Fix It! Contest

      Fix It! Contest
    • Water Contest

      Water Contest
    • Tiny Home Contest

      Tiny Home Contest

    73 Discussions

    How can connect bluetooth module ?

    Direct ?

    Or using any command for it

    Can i direct using source code and upload in my Arduino board? Without an other setting for bluetooth module hc06 ?

    Mail id

    Sahuvedprskash832@gmail.com

    Can i direct using source code and upload in my Arduino board? Without an other setting for bluetooth module hc06 ?

    hey i need your help sir i want to develop an android app controlling 4 servomotor.

    2 replies

    What do you need help with? Please send that to my e-mail. contact@arduinosensors.nl

    Sir please provide me source code for the bluetooth connect my android phone for arduino board in using for multi servo motor run it.
    sahuvedprakash832@gmail.comm


    #include <Servo.h>

    Servo myservo1, myservo2, myservo3, myservo4, myservo5, myservo6, myservo7, myservo8, myservo9, myservo10;

    byte serialA;

    void setup()

    {

    myservo1.attach(9);

    myservo2.attach(10);

    myservo3.attach(11);

    myservo4.attach(3);

    myservo5.attach(5);

    myservo6.attach(6);

    // myservo7.attach(); fill in pin numbers if you use more then 6 servos i left them blank

    // myservo8.attach();

    // myservo9.attach();

    // myservo10.attach();

    Serial.begin(9600);//change your baudrate to your Bluetooth modules baudrate if needed.

    }

    void loop()

    {

    if (Serial.available() > 2) {serialA = Serial.read();Serial.println(serialA);}

    {

    unsigned int servopos = Serial.read();

    unsigned int servopos1 = Serial.read();

    unsigned int realservo = (servopos1 *256) + servopos;

    Serial.println(realservo);

    if (realservo >= 1000 && realservo <1180){

    int servo1 = realservo;

    servo1 = map(servo1, 1000,1180,0,180);

    myservo1.write(servo1);

    Serial.println("servo 1 ON");

    delay(10);

    }

    if (realservo >=2000 && realservo <2180){

    int servo2 = realservo;

    servo2 = map(servo2,2000,2180,0,180);

    myservo2.write(servo2);

    Serial.println("servo 2 On");

    delay(10);

    }

    if (realservo >=3000 && realservo < 3180){

    int servo3 = realservo;

    servo3 = map(servo3, 3000, 3180,0,180);

    myservo3.write(servo3);

    Serial.println("servo 3 On");

    delay(10);

    }

    if (realservo >=4000 && realservo < 4180){

    int servo4 = realservo;

    servo4 = map(servo4, 4000, 4180,0,180);

    myservo4.write(servo4);

    Serial.println("servo 4 On");

    delay(10);

    }

    if (realservo >=5000 && realservo < 5180){

    int servo5 = realservo;

    servo5 = map(servo5, 5000, 5180,0,180);

    myservo5.write(servo5);

    Serial.println("servo 5 On");

    delay(10);

    }

    if (realservo >=6000 && realservo < 6180){

    int servo6 = realservo;

    servo6 = map(servo6, 6000, 6180,0,180);

    myservo6.write(servo6);

    Serial.println("servo 6 On");

    delay(10);

    }

    // if (realservo >=7000 && realservo < 7180){ //UNCOMMENT if using more then 6 Servos.

    // int servo7 = realservo;

    // servo7 = map(servo7, 7000, 7180,0,180);

    // myservo7.write(servo7);

    // Serial.println("servo 7 On");

    // delay(10);

    // }

    //

    // if (realservo >=8000 && realservo < 8180){

    // int servo8 = realservo;

    // servo8 = map(servo8, 8000, 8180,0,180);

    // myservo8.write(servo8);

    // Serial.println("servo 8 On");

    // delay(10);

    // }

    //

    // if (realservo >=9000 && realservo < 9180){

    // int servo8 = realservo;

    // servo8 = map(servo9, 9000, 9180,0,180);

    // myservo8.write(servo8);

    // Serial.println("servo 9 On");

    // delay(10);

    // }

    //

    // if (realservo >=10000 && realservo < 10180){

    // int servo10 = realservo;

    // servo10 = map(servo10, 10000, 10180,0,180);

    // myservo10.write(servo10);

    // Serial.println("servo 10 On");

    // delay(10);

    // }

    }

    }

    2 replies

    please send me the source code

    bhosaletejas03@gmail.com

    urgent plzzzźz

    Please fast i wanna do it now