Send an angle from your phone and watch a servo move to match. This project introduces serial Bluetooth communication in a fun, hands-on way.
What you’ll build
A wireless servo controller. The HC-05 Bluetooth module receives an angle (0–180) sent from a phone app, and the Arduino Nano drives the SG90 servo to that exact position.
Components you’ll need
Step-by-step guide
- Set up the Arduino Nano on the breadboard with powered 5V and GND rails.
- Wire the HC-05: VCC to 5V, GND to GND, TX to D2, and RX to D3 (use a voltage divider on RX for safety).
- Connect the SG90 servo: red to 5V, brown to GND, and the orange signal wire to D9.
- Upload the sketch below to the Nano.
- On your phone, install any “Bluetooth Serial Terminal” app and pair with the HC-05 (default PIN 1234).
- Send a number between 0 and 180 from the app and watch the servo rotate to that angle instantly.
The code
The sketch listens for a number over Bluetooth serial and moves the servo to that angle.
#include <SoftwareSerial.h>
#include <Servo.h>
SoftwareSerial bt(2,3); // HC-05 TX,RX
Servo s;
void setup(){ bt.begin(9600); s.attach(9); }
void loop(){
if(bt.available()){
int angle = bt.parseInt();
if(angle>=0 && angle<=180) s.write(angle);
}
}Build this project
Add all 5 required components to your cart in one click — total ₹585.
Add all components to cart