Coding

To find out how to code your finger read the text and watch the video linked below:

// Include Servo library
#include
Servo myservo;
void setup() {
myservo.attach(9);
pinMode(A0, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run reoeatedly
int flexSensor=analogRead(A0);
int angle = (flexSensor - 380 ) / 1;
Serial.println(angle);
myservo.write(angle);
}