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

Committer:
DavidEGrayson
Date:
Sat Feb 22 04:53:35 2014 +0000
Revision:
11:bd14d512340a
Child:
16:8eaa5bc2bdb1
Added a button on p13.  This will be helpful in a bit for testing my algorithms when there are two stages involved.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DavidEGrayson 11:bd14d512340a 1 #include <mbed.h>
DavidEGrayson 11:bd14d512340a 2 #include "buttons.h"
DavidEGrayson 11:bd14d512340a 3
DavidEGrayson 11:bd14d512340a 4 DigitalIn button1(p13);
DavidEGrayson 11:bd14d512340a 5
DavidEGrayson 11:bd14d512340a 6 void buttonsInit()
DavidEGrayson 11:bd14d512340a 7 {
DavidEGrayson 11:bd14d512340a 8 button1.mode(PullUp);
DavidEGrayson 11:bd14d512340a 9 }
DavidEGrayson 11:bd14d512340a 10
DavidEGrayson 11:bd14d512340a 11 bool button1IsPressed()
DavidEGrayson 11:bd14d512340a 12 {
DavidEGrayson 11:bd14d512340a 13 return button1.read() == 0;
DavidEGrayson 11:bd14d512340a 14 }