#include <Servo.h> ///library
Servo fan; // your name
void setup() {
Serial.begin(9600);
fan.attach(11); //pin it should a ~ pwm pin
}
int pos = 0; //5 , 10 , ,
void loop() {
fan.write(pos); //move to angle
delay(100); //wait for 100 miliseconds
pos += 10; //increase by 5
Serial.println(pos);
if(pos > 180){
pos = 0;
}
}
//0 - 180