Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.
Dependencies: mbed Watchdog SDFileSystem DigoleSerialDisp
Diff: UI/Buttons/Buttons.cpp
- Revision:
- 23:a34af501ea89
- Parent:
- 12:5dfa1ab47838
--- a/UI/Buttons/Buttons.cpp Thu Nov 29 19:45:49 2018 +0000 +++ b/UI/Buttons/Buttons.cpp Fri Nov 30 15:41:05 2018 +0000 @@ -1,18 +1,18 @@ #include "devices.h" #include "Buttons.h" -#include "PinDetect.h" -PinDetect nextButton(BUTTONNEXT); -PinDetect selectButton(BUTTONSELECT); // Input selectButton -PinDetect prevButton(BUTTONPREV); +//PinDetect nextButton(BUTTONNEXT); +//PinDetect selectButton(BUTTONSELECT); // Input selectButton +//PinDetect prevButton(BUTTONPREV); -Buttons::Buttons(void): which(0), pressed(false) +Buttons::Buttons(void): + which(0), pressed(false) { } void Buttons::init() { - +/* // Set up button (plugs into two GPIOs, active low selectButton.mode(PullUp); selectButton.setSamplesTillAssert(50); @@ -31,6 +31,7 @@ prevButton.setAssertValue(0); // active low logic prevButton.setSampleFrequency(50); // us prevButton.attach_asserted( this, &Buttons::prevPressed ); +*/ } void Buttons::nextPressed()