π Quick Start Guide
Robotic Arm Features
5 Degrees of Freedom
Metal Gear Servos
Easy to Print Design
Bluetooth Compatible (extra)
π Project Resources
π Arduino Code
Arduino Sketch for Robotic Arm
#include
Servo servo_0; // Declaration of object to control the first servo
Servo servo_1; // Declaration of object to control the second servo
Servo servo_2; // Declaration of object to control the third servo
Servo servo_3; // Declaration of object to control the fourth servo
Servo servo_4; // Declaration of object to control the fifth servo
Servo servo_5; // Declaration of object to control the sixth servo
Servo servo_6; // Declaration of object to control the seventh servo (not used in this project)
void setup() {
Serial.begin(9600); // Initialize serial communication
servo_0.attach(2); // Associate servo_0 to pin 2
servo_1.attach(3); // Associate servo_1 to pin 3
servo_2.attach(4); // Associate servo_2 to pin 4
servo_3.attach(5); // Associate servo_3 to pin 5
servo_4.attach(6); // Associate servo_4 to pin 6
servo_5.attach(7); // Associate servo_5 to pin 7
servo_6.attach(8); // Associate servo_6 to pin 8
}
void loop() {
if (Serial.available() > 0) { // If there is data available to read
String input = Serial.readStringUntil('\n'); // Read the data string until newline
int servoIndex = input.substring(0, 1).toInt(); // Get the servo index
int servoValue = input.substring(2).toInt(); // Get the servo value
switch (servoIndex) {
case 1:
servo_0.write(servoValue);
break;
case 2:
servo_1.write(servoValue);
break;
case 3:
servo_2.write(servoValue);
break;
case 4:
servo_3.write(servoValue);
break;
case 5:
servo_4.write(servoValue);
servo_6.write(180 - servoValue);
break;
case 6:
servo_5.write(servoValue);
break;
default:
// Invalid servo index
break;
}
}
}
Project Gallery
π¦ Kit Contents
π¦ 5V 5A Adapter
π¦ 3Γ SG90S Servo with Metal Gears
π¦ 3Γ MG995 Servo with Metal Gears
π¦ HC-06 Bluetooth Module
π¦ Arduino UNO
π¦ 6Γ Servo Extension Cables
π¦ 26Γ Screws (with extras)
π¦ 2Γ Allen Keys (M2-M3)
π¦ DC Connector with Thread
π¦ 1m Cable for Arduino