Anon Anon
/
MicroMousewithFloodFill
Updated with the Algorithm
Fork of MM_rat_Assignment4-newwest by
Diff: main.cpp
- Revision:
- 6:ce498700a28c
- Parent:
- 5:bfabc00a73e8
- Child:
- 7:7cdb0381e1b8
--- a/main.cpp Mon Nov 27 17:45:06 2017 +0000 +++ b/main.cpp Mon Nov 27 21:42:00 2017 +0000 @@ -36,8 +36,8 @@ float rightIRBase; float leftFrontIRBase; float rightFrontIRBase; -float p =0.5f; -float i =0.01f; +float p =0.42f; +float i =0.0f; float d=0.1f; LeftIR = 1; RightIR = 1; @@ -98,11 +98,11 @@ FrontRightIR = 0; // pc.printf( "%f \n" , leftValue); //pc.printf("%f \n", rightValue); - if(leftValue> 0.38f && leftFrontValue > 0.22f) + if(leftValue> 0.35f && leftFrontValue > 0.16f) { turn_right(); } - else if(rightFrontValue > 0.21f && rightValue > 0.4f) + else if(rightFrontValue > 0.15f && rightValue > 0.35f) { turn_left(); }