Alex Bulgakov
Published © CC BY-NC-SA

Robotic Arm

It's an arm that can move and pick up some things.

BeginnerFull instructions provided8,785
Robotic Arm

Things used in this project

Hardware components

Servos (Tower Pro MG996R)
×4
Arduino Micro
Arduino Micro
×1
Analog joystick (Generic)
×3
Jumper wires (generic)
Jumper wires (generic)
×30

Story

Read more

Schematics

How to connect all the components??

Code

Code for a Robotic Arm

Arduino
#include <Servo.h>

 Servo myservo1;
 Servo myservo2;
 Servo myservo3;
 Servo myservo4;
 Servo myservo5;
  
  int potpin = 0;
  int potpin1 = A1;
  int potpin2 = A2;
  int potpin3 = A3;
  int potpin4 = A4;
    
  int val;
  int val1;
  int val2;
  int val3;
  int val4;
  
void setup() {
  // put your setup code here, to run once:
 myservo1.attach(9);
 myservo2.attach(10);
 myservo3.attach(11);
 myservo4.attach(12);
 myservo5.attach(8);
}

void loop() {
  // put your main code here, to run repeatedly:
val = analogRead(potpin);
val1 = analogRead(potpin1);
val2 = analogRead(potpin2);
val3 = analogRead(potpin3);
val4 = analogRead(potpin4);

val = map(val, 0, 1023, 0, 60);
val1 = map(val1, 0, 1023, 0, 100); 
val2 = map(val2, 0, 1023, 0, 100);
val3 = map(val3, 0, 1023, 0, 100);
val4 = map(val4, 0, 1023, 0, 100);

myservo1.write(val);
myservo2.write(val1);
myservo3.write(val2);
myservo4.write(val3);
myservo5.write(val4);

delay(25);
}

Credits

Alex Bulgakov

Alex Bulgakov

1 project • 2 followers
I like to make things out of anything. Capable of using some advanced tools. Basics of c++ and 3D printing. Love building airplane models.

Comments