#include <Servo.h>

Servo motor; 
int ServoPin = 8;
int angle = 0; 

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  motor.attach(ServoPin);
}

void loop() {
  // put your main code here, to run repeatedly:
  
  angle = angle + 1; 
  if (angle > 360){
    angle = 0;

  }
  motor.write(angle);
  delay(20);
  }
}
