Roversa turns by spinning for a set amount of time. This program helps you find how many milliseconds it takes to spin one full circle (360°). Once Roversa knows that, it can turn any angle accurately.
Download this code onto your Roversa.
Put a sticker or mark on the floor lined up with the front of Roversa, so you can see when it has spun back to the start.
Press Play button to spin Roversa in place, and watch how far it goes.
Did Roversa stop before completing a full circle? Press the Right turn arrow button to add time.
Did Roversa spin more than a full circle? Press the Left turn arrow to take time away.
Each press changes the time by 20 ms - you'll hear a rising sound when it goes up and a falling sound when it goes down.
Press Play button and repeat Steps 2–3 until Roversa spins exactly one full circle, ending up pointed the same way it started.
Press Menu button to show the milliseconds on the LED screen.
Press Stop button to watch Roversa turn 90°, pause, then turn 180° using your number. If those angles look right, your calibration is good.
Write the number down. In your own project, put this block inside the on start block and update the calibrate ms with the number you wrote down.