EnrikENG
Published

Robotic Hand

Arduino UNO based robotic hand, using flex-sensors and servomotors

IntermediateFull instructions provided1,673
Robotic Hand

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×3

Hand tools and fabrication machines

Wire Welder

Story

Read more

Schematics

ServoMotor Scheme

How a seervomotor is connected to the microcontroller

Flex-Sensor Scheme

How the sensors are connected to the microcontroller

Circuit

All the circuits

Sketch

A sketch that shows all the circuit using also a breadboard

Code

Code

Arduino
The sensor values that you find in the code may be different for every project, depending on the servoMotors and on the position of the sensors. So you may need to change some values in order to make the servoMotors respond perfectly
#include <Servo.h> 
Servo myservo_pollice; 
Servo myservo_indice; 
Servo myservo_medio; 
Servo myservo_anulare; 
Servo myservo_mignolo; 

int pollice;
int indice;  
int medio;
int anulare;
int mignolo;


void setup() {
  Serial.begin(9600);
  myservo_pollice.attach(9);
  myservo_indice.attach(10);
  myservo_medio.attach(11);
  myservo_anulare.attach(12);
  myservo_mignolo.attach(13);
}


void loop() {
  pollice = analogRead(A4);
  indice = analogRead(A3);
  medio = analogRead(A2);
  anulare = analogRead(A1);
  mignolo = analogRead(A0);
   
  Serial.println(mignolo);
  
  pollice = map(pollice, 90, 10, 0, 99); 
  indice = map(indice, 20, 40, 159, 40);
  medio = map(medio, 20, 40, 159, 40);
 // anulare = map(anulare, 20, 40, 0, 179);
  mignolo = map(mignolo, 20, 40, 159, 40);
  
  myservo_pollice.write(pollice);
  myservo_indice.write(indice); 
  myservo_medio.write(medio);
  myservo_anulare.write(anulare);
  myservo_mignolo.write(mignolo);
  
  delay(150);         
}

Credits

EnrikENG
0 projects • 0 followers

Comments