#include <Servo.h>
Servo myservo;
int potpin = 0;
int val;
String input;
int angle;
void setup() {
Serial.begin(9600);
Serial.println("Type something!");
myservo.attach(9);
}
void loop() {
if (Serial.available()){
input = Serial.readStringUntil('/n');
Serial.print("You typed: ");
Serial.println(input);
angle = input.toInt();
Serial.print("You interger: " );
Serial.println(angle);
}
myservo.write(angle);
delay(15);
}