David's dead reckoning code for the LVBots competition on March 6th. Uses the mbed LPC1768, DRV8835, QTR-3RC, and two DC motors with encoders.
Dependencies: PololuEncoder Pacer mbed GeneralDebouncer
buttons.cpp
- Committer:
- DavidEGrayson
- Date:
- 2014-02-23
- Revision:
- 12:835a4d24ae3b
- Parent:
- 11:bd14d512340a
- Child:
- 16:8eaa5bc2bdb1
File content as of revision 12:835a4d24ae3b:
#include <mbed.h> #include "buttons.h" DigitalIn button1(p13); void buttonsInit() { button1.mode(PullUp); } bool button1IsPressed() { return button1.read() == 0; }