Go Down

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

BenCakir

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() 

{
Serial.begin(9600);
}

void loop() 

{

Serial.print("ModeA: ");

Serial.print(buttonsA.readButtons());

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


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:

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

spatula

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!

Arduino
via Egeo 16
Torino, 10131
Italy