PDA

View Full Version : Bounce library included with TeensyDuino - wprogram.h



spanner888
09-21-2013, 05:05 AM
Hi

the Bounce library included with TeensyDuino still includes wprogram.h in Bounce.cpp

The included example actually compiles, but in a large program I am using it fails to compile, with the errors:


/usr/share/arduino-1.0.5/libraries/Bounce/Bounce.cpp:4:22: error: WProgram.h: No such file or directory
/usr/share/arduino-1.0.5/libraries/Bounce/Bounce.cpp: In constructor ‘Bounce::Bounce(uint8_t, long unsigned int)’:
/usr/share/arduino-1.0.5/libraries/Bounce/Bounce.cpp:11: error: ‘millis’ was not declared in this scope
/usr/share/arduino-1.0.5/libraries/Bounce/Bounce.cpp:12: error: ‘digitalRead’ was not declared in this scope
.....


Suggest the Bounce.cpp file be updated to:


#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif