#include <Servo.h>
Servo helmut;
int potentiometer;
int servo;


void setup() {
  // put your setup code here, to run once:
helmut.attach(3);
}

void loop() {
  // put your main code here, to run repeatedly:

potentiometer = analogRead(A0);
servo = map(potentiometer, 0, 1023, 0, 180);
helmut.write(servo);
}