Go Down

Topic: ServoTimer2 library (Read 1 time) previous topic - next topic

Shock

Hi i've download the Servo Timer2 http://www.arduino.cc/playground/uploads/Main/ServoTimer2.zip
and I'm getting this result when compiling

C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:6:26: error: WConstants.h: No such file or directory
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp: In function 'void __vector_9()':
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:36: error: 'LOW' was not declared in this scope
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:36: error: 'digitalWrite' was not declared in this scope
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:43: error: 'HIGH' was not declared in this scope
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:43: error: 'digitalWrite' was not declared in this scope
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp: In member function 'uint8_t ServoTimer2::attach(int)':
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:66: error: 'OUTPUT' was not declared in this scope
C:\Users\Kevin\Documents\Arduino\libraries\ServoTimer2\ServoTimer2.cpp:66: error: 'pinMode' was not declared in this scope.

I have put them in the right place aswell. I have made sure that at ServoTimer2.h file has #include <Arduino.h> and #include <wiring.h> and also for ServoTimer2.cpp I put //#include "WConstant.h"

I need your help asap! I need to use virtualWire and servotimer2 library and I cant make it work.
Thanks!

Erni

#1
Oct 03, 2013, 10:59 am Last Edit: Oct 03, 2013, 11:00 am by Erni Reason: 1
From the sticky in Programming Questions

http://forum.arduino.cc/index.php?topic=97455.0

Quote
2. Version 1.0 of the IDE*

A few things were changed in the 1.0 release version of the IDE. In particular some older examples and libraries may have this at the start:

Code:
#include "WProgram.h"

If you get errors try locating such places and changing that line to:

Code:
#include "Arduino.h"

* IDE = Integrated Development Environment

Shock

Hey I'm using Dev - C++ as my compiler and I wonder why when I modified the .cpp file by including Arduino.h went well. Twas alright all of a sudden. Then when I went home and use my computer, used the same program etc and the same modification, it says the same error again. Do you guys have any clue?

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy