Please help,
I have a zumo robot. I am using and Arduino Uno R3.
When I try to compile the push button example with the libraries I downloaded for the shield I get the following msg :
/usr/share/arduino/libraries/Pushbutton/Pushbutton.cpp: In member function ‘void Pushbutton::init2()’:
/usr/share/arduino/libraries/Pushbutton/Pushbutton.cpp:162:19: error: ‘INPUT_PULLUP’ was not declared in this scope
I have searched the forum with the included subject and nothing turned up.
Can somebody help me
Thank you
vinoroy70
After sometime searching int the arduino.cc forum I found that the INPUT_PULLUP problem is associated with the version of the Arduino IDE. I was using version 1.0 and in version 1.0.1 INPUT_PULLUPs are defined.
Hope this helps someone else along the way.
vinoroy70
Hello.
I’m glad you figured it out! Thanks for letting us know.
-Jon
I am guessing this new command "pinMode(pin, INPUT_PULLUP)"
Is the same as
pinMode(pin, INPUT); digitalWrite(pin, HIGH);
Useful for setting up bump switches or simple interactivity switches.
Yes, those commands should do the same thing. You can learn more about it under the “Defining Pin Levels, HIGH and LOW” section of this Arduino web page.
-Jon