In order to use this method you will need a speed calibration sheet (Click here for a PDF version). Zumi will drive over 5 horizontal white lines that are 2 centimeters wide. The slope and y_intercept will be generated for the best fit line of the speed prediction. These values will be saved to the Zumi as a text file.
This function is necessary for move_to_coordinate(), move_inches(), and move_centimeters().
speed_calibration(speed=40, ir_threshold=100, time_out=3, cm_per_brick=2, show_graphs=False)
speed: Integer value that goes from (0 - 80). The lower the more accurate the speed prediction.
ir_threshold: Integer value for the bottom left IR threshold (0-255).
time_out: The number of seconds before the timeout.
cm_per_brick: The width of each road marker in centimeters.
show_graphs: Boolean default to False. If set to True, a graph will be displayed with the best fit line prediction. *Note: You may need to run this function twice to see the graph.