Go Down

Topic: LiquidWare Buttonshield Errors- Don't Understand. (Read 554 times) previous topic - next topic


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: [Select]
#include <ButtonShield.h>

ButtonShield buttonsA = ButtonShield(0);

ButtonShield buttonsB = ButtonShield(1);

void setup() 


void loop() 


Serial.print("ModeA: ");


Serial.print(" ModeB: ");

Code: [Select]

/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:



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

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!

via Egeo 16
Torino, 10131