Muhammad Sheraz
Published © LGPL

Make a Simple Robotic arm Using Servo Motor

Use this homemade Arduino project to pick and place objects using a servo motor.

IntermediateFull instructions provided10 hours768
Make a Simple Robotic arm Using Servo Motor

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Grove starter kit plus for Intel Edison
Seeed Grove starter kit plus for Intel Edison
×1
ARTIK 10
Samsung ARTIK 10
×1
SparkFun Pi Servo HAT
SparkFun Pi Servo HAT
×1

Story

Read more

Schematics

circuit

File missing, please reupload.

Code

code

Arduino
#include <Servo.h>
Servo servo0;
Servo servo1;
Servo servo2;
Servo servo3;
int sensorvalue0;
int sensorvalue1;
int sensorvalue2;
int sensorvalue3;
void setup()
{
  pinMode(A0,INPUT);
  pinMode(3,OUTPUT);
  servo0.attach(3);
  
  pinMode(A1,INPUT);
  pinMode(5,OUTPUT);
  servo1.attach(5);
  
  pinMode(A2,INPUT);
  pinMode(6,OUTPUT);
  servo2.attach(6);
  
  pinMode(A3,INPUT);
  pinMode(9,OUTPUT);
  servo3.attach(9);
}

void loop()
{
  sensorvalue0 = analogRead(A0);
  sensorvalue0 = map(sensorvalue0, 0, 1023, 0, 180);
  servo0.write(sensorvalue0);
  sensorvalue1 = analogRead(A1);
  sensorvalue1 = map(sensorvalue1, 0, 1023, 0, 180);
  servo1.write(sensorvalue1);
  sensorvalue2 = analogRead(A2);
  sensorvalue2 = map(sensorvalue2, 0, 1023, 0, 180);
  servo2.write(sensorvalue2);
  sensorvalue3 = analogRead(A3);
  sensorvalue3 = map(sensorvalue3, 0, 1023, 0, 180);
  servo3.write(sensorvalue3);
}

Credits

Muhammad Sheraz

Muhammad Sheraz

10 projects • 27 followers
Student of Bsc electrical engineering at 6th semester In NFCIET multan Pakistan.

Comments

Add projectSign up / Login