#include <Servo.h> //accesses the Arduino Servo Library

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

int val;    // variable to read the value from the analog pin

void setup() {
  // put your setup code here, to run once:
  myservo.attach(9);  // ensures output to servo on pin 9

}

void loop() {
  // put your main code here, to run repeatedly:
  val = analogRead(1);            // reads the value of the potentiometer from A1 (value between 0 and 1023) 
  val = map(val, 0, 1023, 0, 320);     // converts reading from potentiometer to an output value in degrees of rotation that the servo can understand 
  myservo.write(val);                  // sets the servo position according to the input from the potentiometer 
  delay(15);                           // waits 15ms for the servo to get to set position  

}

$abcdeabcde151015202530354045505560fghijfghij
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
pot1:GND
pot1:SIG
pot1:VCC
servo1:GND
servo1:V+
servo1:PWM
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
led1:A
led1:C
vcc1:VCC
gnd1:GND
sw1:1
sw1:2
sw1:3