Hello
I am trying to program a bumper sensor in easy C to be hit 3 times and after the third hit the robot will stop. I have tried setting the program up multiple times and I still cannot make the robot stop after the third time. I checked the help file and it only showed me how to stop a program using a while loop with the equation x < 3 and then setting the asignement block to x++. The wait command increased the x variable every 500 miliseconds. I still do not know how to apply this assignement block and loop statement to the bumper sensor. Should I use and IF/Else statement inside a while loop, for loop, or an If loop?
Thank you in advance
P.S. The help file did not clearly state the difference between the for loop, If loop, and While loop. Whats the difference?