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

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

void setup() {
// put your setup code here, to run once:
pinMode(A0, INPUT_PULLUP);

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


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