Hello all. I'm trying to learn how to control servos but I'm having a problem with the tutorial I'm trying to follow in the playground (Arduino Playground - SingleServoExample).
When I try to compile the example sketch in the tutorial I get a bunch of errors concerning the servo.cpp file:
C:\Arduino\libraries\Servo\Servo.cpp: In member function 'uint8_t Servo::attach(int)':
C:\Arduino\libraries\Servo\Servo.cpp:28: error: 'digitalWrite' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp:29: error: 'OUTPUT' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp:29: error: 'pinMode' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp: In member function 'void Servo::write(int)':
C:\Arduino\libraries\Servo\Servo.cpp:52: error: 'clockCyclesPerMicrosecond' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp: In static member function 'static void Servo::refresh()':
C:\Arduino\libraries\Servo\Servo.cpp:74: error: 'millis' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp:107: error: 'digitalWrite' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp:109: error: 'TCNT0' was not declared in this scope
C:\Arduino\libraries\Servo\Servo.cpp:124: error: 'digitalWrite' was not declared in this scope
I have done everything exactly as the tutorial said to do, but now I'm stuck. I searched the forums for a solution, but the only thing I found was someone with the same problem but didn't give enough information for anyone to help with a solution (Neither Knob nor Sweep servo sketches compile - Programming Questions - Arduino Forum). As was suggested in that thread, I made sure my sketch and servo library are in the correct folders, but it's still not compiling.
Anyone know what is happening?