Servo Example Errors

I tried using the servo example that comes with the Arduino software. I tried both knob, and sweep. I get the following error:

Sweep:8: error: 'Servo' does not name a type
Sweep.ino: In function 'void setup()':
Sweep:15: error: 'myservo' was not declared in this scope
Sweep.ino: In function 'void loop()':
Sweep:23: error: 'myservo' was not declared in this scope
Sweep:28: error: 'myservo' was not declared in this scope

That makes me suspect the Servo library hasn't been installed correctly/completely. Have you restarted the IDE after installing the Servo library files?

Have you the line

#include <Servo.h>

at the top of your code - with a capital S for Servo

C/C++ is case sensitive.

Post a copy of the actual code you are using - and please use code tags (the # icon).

…R

For some reason it ended up working after my computer was restarted. Interesting.

You must be very new to computers if that surprised you. :slight_smile:

...R