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


RevisionDateWhoCommit message
48:597738b77f77 14 months ago DavidEGrayson Changes from before the contest, I think. default tip
47:9773dc14c834 15 months ago DavidEGrayson Got some awesome results using carefully calculated scale factors for the gyro!
46:df2c2d25c070 15 months ago DavidEGrayson Some minor changes. The overall dead reckoning is working now, but I don't think I did much to fix it.
45:81dd782bc0b4 15 months ago DavidEGrayson Calibrate the line sensors. Add testLineSensorsAndCalibrate. Unfortunately, testLineFollowing is not working though.
44:b4a00fbab06b 15 months ago DavidEGrayson Get testDriveHome to work: the robot got to within about 6 inches of where it was in one test I did.
43:0e985a58f174 15 months ago DavidEGrayson Changed reckoner to use readings from turnSensor (Gyro) to get its direction vector instead of encoder ticks.
42:96671b71aac5 15 months ago DavidEGrayson Calibrate L3G using a buffer of 1000 zero-rate readings. Measured a drift of -1.850 degrees over 3 minutes (-0.01 degree per second).
41:3ead1dd2cc3a 15 months ago DavidEGrayson Gyro: Add a hacky offset of +6.5 in TurnSensor.cpp. The turn sensor drifts much more slowly now, like maybe 1 degree per minute.
40:6fa672be85ec 15 months ago DavidEGrayson Add TurnSensor and L3G code but I am not happy with how the Gyro drifts a degree every few seconds or so.
39:b19dfc5d4d4b 15 months ago DavidEGrayson New motors! 100:1 HP.
38:5e93a479c244 2014-03-13 DavidEGrayson The final version of the code that was used for the competition.;
37:23000a47ed2b 2014-03-06 DavidEGrayson With a boost 0.2% to handleRight in the Reckoner, this code did very well on the course twice!! Then I ran it the other way and it was more than a foot off :(
36:ccb03b734737 2014-03-06 DavidEGrayson Reckoner: The order of changing cos and sign matters! I fixed it.
35:d365d755c686 2014-03-05 DavidEGrayson Stuff.
34:6c84680d823a 2014-03-05 DavidEGrayson Not sure.;
33:58a0ab6e9ad2 2014-03-05 DavidEGrayson Bunch of stuff. Then reduced drivingSpeed to 400.
32:83a13b06093c 2014-03-04 DavidEGrayson getting line sensors to work again;
31:739b91331f31 2014-03-04 DavidEGrayson testLineSensors seems to work fine with QTR-3RC.
30:84be2d602dc0 2014-03-04 DavidEGrayson Seems like the QTR-3RC could work, based on my tests on P10.
29:cfcf08d8ac79 2014-03-04 DavidEGrayson trying to figure out the analog problem;
28:4374035df5e0 2014-03-01 DavidEGrayson Discovered that 4 out of the 6 analog inputs on the mbed are severely messed up. Might need to get a new mbed or do digital filtering (a median of three readings out to work).
27:2456f68be679 2014-03-01 DavidEGrayson Fixed a major bug in the line following (reduceSpeed return value was not used). Made finalSettleIn better by adding an integral term and increasing the settleSpeed from 200 to 300.
26:7e7c376a7446 2014-02-28 DavidEGrayson This is my attempt to make it hang on to the line better after finding it. I found a really bad bug in followLineToEnd that might explain all the problems, but I also changed the loadCalibrationAndFindLine function so it doesn't overshoot.
25:73c2eedb3b91 2014-02-28 DavidEGrayson Some stuff. I am about to take away the foundLineTimer in an attempt to make it better at finding the line.
24:fc01d9125d3b 2014-02-28 DavidEGrayson Fixed the problem with LineTracker always thinking the line was visible.
23:aae5cbe3b924 2014-02-28 DavidEGrayson Stuff;
22:44c032e59ff5 2014-02-28 DavidEGrayson Fixed the code for calibrating. Added testCalibrate.
21:c279c6a83671 2014-02-27 DavidEGrayson Wrote a whole bunch of code that could theoretically allow the robot to compete, but it has not been tested at all yet.
20:dbec34f0e76b 2014-02-27 DavidEGrayson Broke up driveHome into two functions.
19:a11ffc903774 2014-02-25 DavidEGrayson Got the robot to get back to its home position and stop.
18:b65fbb795396 2014-02-24 DavidEGrayson Got the robot to face towards home!
17:2df9861f53ee 2014-02-24 DavidEGrayson Created a stub driveHome routine that we need to fill in.
16:8eaa5bc2bdb1 2014-02-24 DavidEGrayson Got debounced button pressing to work.
15:4df8c50b5e91 2014-02-24 DavidEGrayson Finished experiments and change the value of dA to an experimentally determined value.;
14:c8cca3687e64 2014-02-24 DavidEGrayson Started doing an experiment to see what dA really is.
13:bba5b3abd13f 2014-02-23 DavidEGrayson testReckoner routine works great! I can roll my robot around and it always knows what quadrant it is pointing to and knows what quadrant it is in!
12:835a4d24ae3b 2014-02-23 DavidEGrayson Made the Reckoner class and wrote a routine to help test it.;
11:bd14d512340a 2014-02-22 DavidEGrayson Added a button on p13. This will be helpful in a bit for testing my algorithms when there are two stages involved.
10:e4dd36148539 2014-02-22 DavidEGrayson Successfully tested the encoders, printing out a nice bar graph.
9:9734347b5756 2014-02-22 DavidEGrayson Made verything use CamelCase.;
8:78b1ff957cba 2014-02-22 DavidEGrayson refactored into many files
7:85b8b5acfb22 2014-02-21 DavidEGrayson Setting more PWM registers now, but the call to period_us is still necessary for some reason.
6:89a39870e23d 2014-02-20 DavidEGrayson Got high-resolution 20 kHz PWM.
5:01ad080dc4fa 2014-02-20 DavidEGrayson Succeeded in getting high resolution PWM.
4:1b20a11765c8 2014-02-20 DavidEGrayson Succeeded in generating basic PWM signals with PwmOut.
3:59c80d4b4bf2 2014-02-20 DavidEGrayson Done working on encoder stuff for now.;
2:968338353aef 2014-02-20 DavidEGrayson Moved the code to enable pull-ups into the app.
1:d0d9653a4547 2014-02-20 DavidEGrayson Added pacers.
0:e77a0edb9878 2014-02-20 DavidEGrayson Got basics working. See commit for library.