Prosthetic Finger Project
Code used
Below is the coding used to program the flexi sensor and spinner. Copy and paste into Arduino for the most effective function.
#include
Servo myservo;
void setup() {
myservo.attach(9);
pinMode(A0, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
int flexSensor = analogRead(A0);
int angle = (flexSensor - 400) / 2;
Serial.println(angle);
myservo.write(angle);
}
Video
This video will explain each line of coding that is required to code
the bionic finger and how it differs from each individual finger.