Lesson 9 Servo

Hello,
In Lesson 9 is the code wrong. The only thing thatpops off is "exit status 1 redefinition of 'void setup()'".
I dont know what i can do. Thank you for all help. :slight_smile:

Post your code, in code tags.

#include <Servo.h>

Servo myservo;  

int pos = 0;    

void setup() {
  myservo.attach(9);  
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { 
    myservo.write(pos);              
    delay(15);                       
  }
  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos);              
    delay(15);                       
  }
}

Compiles fine for me with the default setup.

Thank you for Help. I reinstalled the IDE and it worked. should had done it earlier. :sweat_smile: