what does "#include <Servo.h>" do in the programming. I think it may be a library to make it easier to move a servo. I refer particularly to this sketch;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
int val; // set val between 0-180 to move servo
void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
Serial.begin(115200);
}
void loop() {
Serial.print("input value for variable val: ");
while (Serial.available() == 0) {
}
val = Serial.parseInt();
Serial.print("val=");
Serial.println(val);
myservo.write(val);
delay(15);
}