Devices & Components
Arduino Uno Rev3
Connector(male to male)
Servo Horns
12V Power Supply
M2 x 18mm Button Head Black Metal Screws
Micro Servo Motor
2K Ohm resistor
LM 7805
1K ohm resistor
Capacitor 0.1 µF
Jumper Wire Female to Male
USB Cable for Arduino UNO
HC-05 Bluetooth Module
0.33 uF Capacitor
Hardware & Tools
3D printer filament (PLA)
3D printer
Screwdrivers
Software & Tools
Arduino IDE
Bambu Lab
MIT App Inventor 2
TINKERCAD
Project description
Code
Servo & BT module code
cpp
1Bluetooth & servo code 2#include <SoftwareSerial.h> 3#include <Servo.h> 4 5SoftwareSerial BTserial(9,10); // RX | TX 6 7Servo servo_1; 8Servo servo_2; 9Servo servo_3; 10Servo servo_4; 11 12void setup() { 13 Serial.begin(9600); 14 BTserial.begin(9600); 15 16 servo_1.attach(5); 17 servo_2.attach(6); 18 servo_3.attach(7); 19 servo_4.attach(8); 20} 21 22void loop() { 23 if (BTserial.available()) { 24 int input = BTserial.read(); 25 26 if (input == 1) { 27 for(int i = 0; i < 5; i++) { 28 servo_1.write(10); 29 delay(100); 30 servo_1.write(40); 31 delay(100); 32 } 33 servo_1.write(20); 34 delay(1000); 35 servo_1.write(100); 36 delay(1000); 37 } 38 else if (input == 2) { 39 for(int i = 0; i < 5; i++) { 40 servo_2.write(10); 41 delay(200); 42 servo_2.write(40); 43 delay(200); 44 } 45 servo_2.write(20); 46 delay(1000); 47 servo_2.write(100); 48 delay(1000); 49 } 50 else if (input == 3) { 51 for(int i = 0; i < 5; i++) { 52 servo_3.write(10); 53 delay(200); 54 servo_3.write(40); 55 delay(200); 56 } 57 servo_3.write(20); 58 delay(1000); 59 servo_3.write(100); 60 delay(1000); 61 } 62 else if (input == 4) { 63 for(int i = 0; i < 5; i++) { 64 servo_4.write(10); 65 delay(200); 66 servo_4.write(40); 67 delay(200); 68 } 69 servo_4.write(20); 70 delay(1000); 71 servo_4.write(100); 72 delay(1000); 73 } 74 input = ""; 75 } 76}
Downloadable files
Tinkercad Design File
https://www.tinkercad.com/things/4lNwLHIzOuM-final-print-v5/edit?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=IFm0FRypQLvTRmTN_7siv5XEQmad5XzK2Nt-vGbb3qI
Tinkercad Design File2
https://www.tinkercad.com/things/f0ZyYtWxG4y-3d-print-v7/edit?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard&sharecode=y9glAnEepzJyEhitnvQc3Bc1AecIL8ccJc1Sxw5BR1g
MIT APP Inventor Files
https://drive.google.com/drive/folders/1OXGxMh1uoT62A1-LqTsFLGmeVS7jplWC?usp=sharing
Documentation
Arduino Wiring Diagram Circuit
Image.jpeg

Comments
Only logged in users can leave comments