Pages: [1]   Go Down
Author Topic: ServoTimer2 library  (Read 725 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1057
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: October 03, 2013, 04:00:54 am by Erni » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Pages: [1]   Go Up
Jump to: