Mouse code for the MacroRat
Diff: main.h
- Revision:
- 43:f22168a05c3e
- Parent:
- 41:56a34315dd75
- Child:
- 44:85bf2c0cd518
diff -r 75257e6c4c76 -r f22168a05c3e main.h --- a/main.h Sun May 28 06:50:22 2017 +0000 +++ b/main.h Sun May 28 10:09:56 2017 +0000 @@ -172,11 +172,11 @@ //#define II_CONSTANT 0.06 //#define ID_CONSTANT 7.55 -const int desiredCount180 = 2900; // change accordingly to the terrain -const int desiredCountR = 1475; -const int desiredCountL = 1495; +const int desiredCount180 = 3120; // change accordingly to the terrain +const int desiredCountR = 1390; +const int desiredCountL = 1475; -const int oneCellCount = 5400; +const int oneCellCount = 5480; const int oneCellCountMomentum = 4590;//4570 (.15) speed;//4800; // one cell count is actually approximately 5400, but this value is considering momentum! double receiverOneReading = 0.0; @@ -184,7 +184,7 @@ double receiverThreeReading = 0.0; double receiverFourReading = 0.0; -const double frontStop = 7.55; +const double frontStop = 7.9; const double LRAvg = 3.5; float ir1base = 0.0; @@ -255,7 +255,7 @@ double speed1 = 0.12; // change back to 0.13 if turns stop working, testing something out! // double kp = 0.00009; - double kp = 0.0002; + double kp = 0.00015; int counter = 0; int initial0 = encoder0.getPulses();