![](/media/cache/profiles/ebb9a55061af33b68d38f7ce72e4460f.50x50_q85.jpg)
David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: buttons.cpp
- Revision:
- 11:bd14d512340a
- Child:
- 16:8eaa5bc2bdb1
diff -r e4dd36148539 -r bd14d512340a buttons.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buttons.cpp Sat Feb 22 04:53:35 2014 +0000 @@ -0,0 +1,14 @@ +#include <mbed.h> +#include "buttons.h" + +DigitalIn button1(p13); + +void buttonsInit() +{ + button1.mode(PullUp); +} + +bool button1IsPressed() +{ + return button1.read() == 0; +} \ No newline at end of file