Mouse code for the MacroRat
Diff: main.h
- Revision:
- 38:fe05f93009a2
- Parent:
- 37:3dcc95e9321c
- Child:
- 39:058fb32c24e0
diff -r 3dcc95e9321c -r fe05f93009a2 main.h --- a/main.h Sat May 27 03:37:24 2017 +0000 +++ b/main.h Sat May 27 21:29:55 2017 +0000 @@ -172,12 +172,12 @@ //#define II_CONSTANT 0.06 //#define ID_CONSTANT 7.55 -const int desiredCount180 = 3400; // change accordingly to the terrain +const int desiredCount180 = 3380; // change accordingly to the terrain const int desiredCountR = 1600; -const int desiredCountL = 1590; +const int desiredCountL = 1600; const int oneCellCount = 5400; -const int oneCellCountMomentum = 4900;//4570 (.15) speed;//4800; // one cell count is actually approximately 5400, but this value is considering momentum! +const int oneCellCountMomentum = 5070;//4570 (.15) speed;//4800; // one cell count is actually approximately 5400, but this value is considering momentum! double receiverOneReading = 0.0; double receiverTwoReading = 0.0; @@ -186,9 +186,7 @@ float ir1base = 0.0; float ir2base = 0.0; - float ir3base = 0.0; - float ir4base = 0.0; float averageDivUpper = 0.5; @@ -198,7 +196,7 @@ double speed0 = 0.11; double speed1 = -0.12; // change back to 0.13 if turns stop working, testing something out! - double kp = 0.000080; + double kp = 0.000082; int counter = 0; int initial0 = encoder0.getPulses();