const unsigned int SERVO = 11;
const unsigned int PT = A0;
int resistance = 0 ;
int angel = 0;
#include <Servo.h>
Servo motor ;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
motor.attach(SERVO);
}
void loop() {
// put your main code here, to run repeatedly:
resistance = analogRead(PT);
angel = map(resistance , 0 , 1023 , 0 , 180);
Serial.print(resistance);
Serial.print(":");
Serial.println(angel);
motor.write(angel);
delay(100);
}