Help, how to stop the run 3 laps 3pi

Hello, good afternoon, I am totally new to the 3pi robot, someone would be kind enough to help for my robot to make a tour stop 3 times, please. A question top speed I can put a value greater than 255? :astonished:


It is not clear to me from your description what you want the 3pi robot to do. Could you describe the behavior you want in more detail? Do you want it to stop after 3 laps, do you want it to stop 3 times during each lap, or do want it to do something else?

A value of 255 corresponds to 100% duty cycle on the motors; this means the max amount of power is being applied to the motors. You can find out more in the Motors and Gearboxes section of the 3pi user’s guide.

- Grant

Thanks for responding friend, look what happens is that at the beginning of the course there is a line perpendicular, like a cross, the 3pi starts before this line, every time I pass the course must recognize it as a return and the third round should stop after line above … would greatly appreciate your help please …

You can implement a counter that counts up every time the 3pi passes over the “cross”. The counter can go up whenever both the outermost sensors detect black. Once your counter reaches the designated number of laps, the 3pi robot should be commanded to stop.

If you have trouble implementing this, you could post your code and describe the robot’s behavior, and I can take a look at it.

- Grant