Skip to main content

drive over markers

Block#

drive over markers block image

Description#

This function was designed for the Zumitown Mat. Zumi will drive over the specified number of alternating black and white horizontal lines at least 2 centimeters wide. Zumi will stop when the number of markers have been crossed or if the timeout ends, whichever is first. (Avoid making the speed very high, zumi will most likely overshoot since it has a lot of speed)

Parameters#

markers: An integer number of road markers to drive over
speed: Positive integer value between 0 and 80
IR_threshold: An integer IR threshold value 0-255 for the bottom left IR sensors to detect black or white.
time_out: A float value for the timeout in seconds

Returns#

None

Example#

Drive over 5 markers with a timeout of 3 seconds. drive over markers example