Devices & Components
Arduino Uno Rev3
Breadboard (generic)
SG90 Micro-servo motor
HC-05 Bluetooth Module
Jumper wires (generic)
Hardware & Tools
Tape, Double Sided
Latch
Paper clip
Software & Tools
Arduino IDE
Project description
Code
Arduino Code for the project
c_cpp
Connect your Arduino to your laptop or PC and upload the code
1// including the servo library 2#include <Servo.h> 3// declaring and defining myservo 4Servo myservo; 5// this variable holds the values that the servo will move 6int Position ; 7 8void setup() 9{ 10 // myservo is connected to PWM pin 9 11 myservo.attach(9); 12//settin up the baud rate for the bluetooth module and mobile to communicate 13 Serial.begin(9600); 14} 15 16void loop() 17{ 18 if (Serial.available() > 0) 19 { 20 //if the values recieved are equal to 0 or 90 the sero will move to the respective angl 21 Position = Serial.read(); 22 if (Position == 0 || Position == 90) { 23 myservo.write(Position); 24 } 25 } 26}
Downloadable files
circuit diagram
circuit diagram

circuit diagram
circuit diagram

Comments
Only logged in users can leave comments