David's line following code from the LVBots competition, 2015.

Dependencies:   GeneralDebouncer Pacer PololuEncoder mbed

Fork of DeadReckoning by David Grayson

Revisions of main.cpp

Revision Date Message Actions
57:99bec7fab454 2015-04-16 Doubled the encoder counts for indicating the end of the course because we might have to start a little bit back from the finish line. File  Diff  Annotate
56:55b1473f9e3b 2015-04-16 Made the y tolerance in foundStart less strict because sometimes the wobble from the robot makes it hard to hit that target exactly. File  Diff  Annotate
54:1ca4e748e098 2015-04-16 tinkering with the lookaheadamount parameter; File  Diff  Annotate
53:73565a3ef5c5 2015-04-16 just committing to be safe because the robot is working pretty well now File  Diff  Annotate
52:05a8e919ddb0 2015-04-15 It learned the course, holy shit! File  Diff  Annotate
51:b9f7243609d4 2015-04-15 got it to detect the starting point better; File  Diff  Annotate
50:517c0f0e621f 2015-04-15 got it to detect roughly when it gets back to the center, but then I tried to make it fancier and it stopped working File  Diff  Annotate
49:eaa6fd514f4f 2015-04-15 something?; File  Diff  Annotate
48:c84b7b3ab0e8 2015-04-15 made it record entries every 200 encoder counts, instead of every 200 ms; File  Diff  Annotate
46:f11cb4f93aac 2015-04-15 got dead reckoning working nicely with the gyro; File  Diff  Annotate
45:e16e74bbbf8c 2015-04-15 got turn sensor working; File  Diff  Annotate
44:edcacba44760 2015-04-15 Got the L3GD20H working, but I'm having trouble with TurnSensor. File  Diff  Annotate
43:6cb32548c1b4 2015-04-14 at speed 1100, and voltage 4.9, it manages to follow File  Diff  Annotate
42:ead542746cd2 2015-04-14 pushed speed from 800 to 1000. It goes off the course in a few places but then it gets back on. File  Diff  Annotate
41:4a4be80ff38c 2015-04-14 pushed speed up from 600 to 800, no problems File  Diff  Annotate
40:e79cefc241f8 2015-04-14 added that derivative term; File  Diff  Annotate
39:a5e25fd52ff8 2015-04-14 Made it follow the line a little faster (600 out of 1200). Need a derivative term though, because it oscillates back and forth on the straight part. File  Diff  Annotate
38:5e93a479c244 2014-03-13 The final version of the code that was used for the competition.; File  Diff  Annotate
37:23000a47ed2b 2014-03-06 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 :( File  Diff  Annotate
34:6c84680d823a 2014-03-05 Not sure.; File  Diff  Annotate
33:58a0ab6e9ad2 2014-03-05 Bunch of stuff. Then reduced drivingSpeed to 400. File  Diff  Annotate
32:83a13b06093c 2014-03-04 getting line sensors to work again; File  Diff  Annotate
31:739b91331f31 2014-03-04 testLineSensors seems to work fine with QTR-3RC. File  Diff  Annotate
30:84be2d602dc0 2014-03-04 Seems like the QTR-3RC could work, based on my tests on P10. File  Diff  Annotate
29:cfcf08d8ac79 2014-03-04 trying to figure out the analog problem; File  Diff  Annotate
28:4374035df5e0 2014-03-01 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). File  Diff  Annotate
27:2456f68be679 2014-03-01 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. File  Diff  Annotate
26:7e7c376a7446 2014-02-28 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. File  Diff  Annotate
25:73c2eedb3b91 2014-02-28 Some stuff. I am about to take away the foundLineTimer in an attempt to make it better at finding the line. File  Diff  Annotate
24:fc01d9125d3b 2014-02-28 Fixed the problem with LineTracker always thinking the line was visible. File  Diff  Annotate
23:aae5cbe3b924 2014-02-28 Stuff; File  Diff  Annotate
22:44c032e59ff5 2014-02-28 Fixed the code for calibrating. Added testCalibrate. File  Diff  Annotate
21:c279c6a83671 2014-02-27 Wrote a whole bunch of code that could theoretically allow the robot to compete, but it has not been tested at all yet. File  Diff  Annotate
20:dbec34f0e76b 2014-02-27 Broke up driveHome into two functions. File  Diff  Annotate
19:a11ffc903774 2014-02-25 Got the robot to get back to its home position and stop. File  Diff  Annotate
18:b65fbb795396 2014-02-24 Got the robot to face towards home! File  Diff  Annotate
17:2df9861f53ee 2014-02-24 Created a stub driveHome routine that we need to fill in. File  Diff  Annotate
16:8eaa5bc2bdb1 2014-02-24 Got debounced button pressing to work. File  Diff  Annotate
12:835a4d24ae3b 2014-02-23 Made the Reckoner class and wrote a routine to help test it.; File  Diff  Annotate
10:e4dd36148539 2014-02-22 Successfully tested the encoders, printing out a nice bar graph. File  Diff  Annotate
9:9734347b5756 2014-02-22 Made verything use CamelCase.; File  Diff  Annotate
8:78b1ff957cba 2014-02-22 refactored into many files File  Diff  Annotate
7:85b8b5acfb22 2014-02-21 Setting more PWM registers now, but the call to period_us is still necessary for some reason. File  Diff  Annotate
6:89a39870e23d 2014-02-20 Got high-resolution 20 kHz PWM. File  Diff  Annotate
5:01ad080dc4fa 2014-02-20 Succeeded in getting high resolution PWM. File  Diff  Annotate
4:1b20a11765c8 2014-02-20 Succeeded in generating basic PWM signals with PwmOut. File  Diff  Annotate
3:59c80d4b4bf2 2014-02-20 Done working on encoder stuff for now.; File  Diff  Annotate
2:968338353aef 2014-02-20 Moved the code to enable pull-ups into the app. File  Diff  Annotate
1:d0d9653a4547 2014-02-20 Added pacers. File  Diff  Annotate
0:e77a0edb9878 2014-02-20 Got basics working. See commit for library. File  Diff  Annotate