Go Down

Topic: exit status 1  (Read 65 times) previous topic - next topic

yousef226

Greetings

I want to run this code on my Arduino nano but i get this error message:


C:\Users\Yousef\Desktop\sketch_mar25b\sketch_mar25b.ino:1:19: fatal error: servo.h: No such file or directory

 #include <servo.h>

                   ^

compilation terminated.

exit status 1
Error compiling for board Arduino Nano.


My code is very simple:

#include <servo.h>
Servo servo;
void setup() {
  servo.attach(3);
  servo.write (0);

}

void loop() {

  servo.write (90);
  delay (1000);
  servo.write (0);
  delay (1000);
 

}



please help me:(

larryd

No technical PMs.
The last thing you did is where you should start looking.

slipstick

Try  #include <Servo.h>

Steve

Go Up