How to Code a Bionic Finger

What is the code needed to program a bionic finger to move?

To code your bionic finger, if you are using and Arduino board, you should download the Arduino app that lets you code and upload it to Arduino boards. You can dowload it here. The code should look like this:
// Include Servo Library
#include

Servo myservo; // create servo object to control a servo

void setup() {
// put your setup code here, to run once:
myservo.attach(9);
pinMode(A0, INPUT_PULLUP);
Serial.begin(9600);

}
void loop() {
// put your main code here, to run repeatedly:
int flexSensor=analogRead(A0);
int angle=(flexSensor-400 / 2);
Serial.println(angle);
myservo.write(angle);
}

myservo.write(angle);
}

Below is a video explaining the meaning of the code and how to use it.