Pages: [1]   Go Down
Author Topic: LiquidWare Buttonshield Errors- Don't Understand.  (Read 295 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using a ButtonShield from Liquidware for a project, but the documentation is flaky and there are compatibility errors.
The only way to get the library is to download their Arduino IDE, which runs on 18. WHen I try to take the library from it and put it in the official 1.0.3 distro, then run the sample code,I get this:

Code:
#include <ButtonShield.h>

ButtonShield buttonsA = ButtonShield(0);

ButtonShield buttonsB = ButtonShield(1);

void setup() 

{
Serial.begin(9600);
}

void loop() 

{

Serial.print("ModeA: ");

Serial.print(buttonsA.readButtons());

Serial.print(" ModeB: ");
Serial.print(buttonsB.readButtons());
}

Code:

/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:2:20: error: wiring.h: No such file or directory
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp: In member function 'void ButtonShield::setMode(uint8_t)':
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:39: error: 'INPUT' was not declared in this scope
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:39: error: 'pinMode' was not declared in this scope
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:40: error: 'HIGH' was not declared in this scope
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:40: error: 'digitalWrite' was not declared in this scope
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp: In member function 'int ButtonShield::readButtons()':
/Applications/Arduinorecent.app/Contents/Resources/Java/libraries/ButtonShield/ButtonShield.cpp:50: error: 'digitalRead' was not declared in this scope

Variations of these errors appear in different examples:

http://www.liquidware.com/system/0000/2370/ButtonShield_Datasheet_13Jul09.pdf
http://antipastohw.pbworks.com/w/page/26626459/ButtonShield
https://github.com/liquidware/antipasto_arduino
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try editing ButtonShield.cpp and replace #include <wiring.h> with #include <Arduino.h>.
Logged

Pages: [1]   Go Up
Jump to: