Bluetooth Servo

Control servo motor using Arduino, Bluetooth module and Bluetooth Servo Android app.

  1. Download Bluetooth Servo application from PlayStore
  2. Connect the Bluetooth module and servo motor to the arduino board
  3. Upload the program
  4. Pair the mobile to Bluetooth module
  5. Connect Bluetooth Servo app to the Bluetooth module
  6. Control the servo by rotating the widget available in the Bluetooth Servo app
#include <Servo.h>

Servo myservo;
SoftwareSerial mySerial(10, 11); // RX and TX of SoftwareSerial
int Angle = 0;  //Creating a new integer with name of Angle and value of 0

void setup() {
 myservo.attach(9); //Servo input is connected to the Digital pin 9 (PWM pin)
 mySerial.begin(9600); //Starting softwareSerial with Buad rate of 9600
 Serial.begin(9600); //Starting normal Serial with Buad rate of 9600
void loop() {
 if (mySerial.available()) { //Check any data available from Bluetooth
   Angle = (mySerial.readString().toInt()); //Converting the received data to integer and store it in Angle variable
   Serial.println(Angle);  //Serial printing the received data
   myservo.write(Angle);  //Rotating the servo by received angle