this code is completely restructured, but should do the same thing. did not want to directly commit, since it may not work at all. compiles though.
Dependencies: AVEncoder mbed-src-AV
Fork of Test by
sensors.h@13:5f08195456a4, 2015-12-15 (annotated)
- Committer:
- jimmery
- Date:
- Tue Dec 15 08:56:36 2015 +0000
- Revision:
- 13:5f08195456a4
HUGE RESTRUCTURING OF THE CODE.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jimmery | 13:5f08195456a4 | 1 | #ifndef SENSORS_H |
jimmery | 13:5f08195456a4 | 2 | #define SENSORS_H |
jimmery | 13:5f08195456a4 | 3 | |
jimmery | 13:5f08195456a4 | 4 | const float base_RS = 0.2; |
jimmery | 13:5f08195456a4 | 5 | const float base_LS = 0.1; |
jimmery | 13:5f08195456a4 | 6 | const float base_RF = 0.002; |
jimmery | 13:5f08195456a4 | 7 | const float base_LF = 0.15; |
jimmery | 13:5f08195456a4 | 8 | |
jimmery | 13:5f08195456a4 | 9 | const float thresh_LF = 0.3; |
jimmery | 13:5f08195456a4 | 10 | const float thresh_RF = 0.0045; // TODO: CAUTION USING THIS ALONE. |
jimmery | 13:5f08195456a4 | 11 | |
jimmery | 13:5f08195456a4 | 12 | const float open_left = 0.22; //calibrate these two |
jimmery | 13:5f08195456a4 | 13 | const float open_right = 0.18; |
jimmery | 13:5f08195456a4 | 14 | const float wall_left = 0; |
jimmery | 13:5f08195456a4 | 15 | const float wall_right = 0; |
jimmery | 13:5f08195456a4 | 16 | |
jimmery | 13:5f08195456a4 | 17 | // MAZE/MOUSE CONSTANTS. |
jimmery | 13:5f08195456a4 | 18 | const int cell_length_count = 2000; |
jimmery | 13:5f08195456a4 | 19 | |
jimmery | 13:5f08195456a4 | 20 | //time to make a 90 degree turn and move forward one cell length, repectively |
jimmery | 13:5f08195456a4 | 21 | //should be replaced with encoder counts |
jimmery | 13:5f08195456a4 | 22 | const float gyro_90 = 0.595; |
jimmery | 13:5f08195456a4 | 23 | |
jimmery | 13:5f08195456a4 | 24 | #endif |