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:44:44 2014 +0000
Revision:
10:e4dd36148539
Parent:
9:9734347b5756
Child:
12:835a4d24ae3b
Successfully tested the encoders, printing out a nice bar graph.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DavidEGrayson 0:e77a0edb9878 1 #include <mbed.h>
DavidEGrayson 8:78b1ff957cba 2 #include <Pacer.h>
DavidEGrayson 0:e77a0edb9878 3
DavidEGrayson 8:78b1ff957cba 4 #include "motors.h"
DavidEGrayson 8:78b1ff957cba 5 #include "encoders.h"
DavidEGrayson 9:9734347b5756 6 #include "leds.h"
DavidEGrayson 8:78b1ff957cba 7 #include "pc_serial.h"
DavidEGrayson 9:9734347b5756 8 #include "test.h"
DavidEGrayson 0:e77a0edb9878 9
DavidEGrayson 10:e4dd36148539 10 int __attribute__((noreturn)) main()
DavidEGrayson 2:968338353aef 11 {
DavidEGrayson 2:968338353aef 12 pc.baud(115200);
DavidEGrayson 2:968338353aef 13
DavidEGrayson 2:968338353aef 14 // Enable pull-ups on encoder pins and give them a chance to settle.
DavidEGrayson 9:9734347b5756 15 encodersInit();
DavidEGrayson 9:9734347b5756 16 motorsInit();
DavidEGrayson 4:1b20a11765c8 17
DavidEGrayson 8:78b1ff957cba 18 // Test routines
DavidEGrayson 9:9734347b5756 19 //testMotors();
DavidEGrayson 10:e4dd36148539 20 //testEncoders();
DavidEGrayson 10:e4dd36148539 21 testLineSensors();
DavidEGrayson 2:968338353aef 22
DavidEGrayson 4:1b20a11765c8 23 while(1)
DavidEGrayson 4:1b20a11765c8 24 {
DavidEGrayson 9:9734347b5756 25
DavidEGrayson 0:e77a0edb9878 26 }
DavidEGrayson 0:e77a0edb9878 27 }