If Roversa is not driving in a straight line, it may need to be calibrated for both forward and backward movement. This program helps you find the values for each direction.
Download this code onto your Roversa and put it on the floor with about a foot of clear space in front of and behind it.
Press Forward button. The screen shows ↑ (forward arrow) and Roversa drives forward for 2 seconds.
Press the turn arrow for the way you want Roversa to move:
If Roversa is drifting to the left, press Right button to correct.
If Roversa is drifting to the right, press Left button to correct.
Each button press changes the number by 1, with a rising or falling sound.
Press Forward button again and keep adjusting until Roversa drives straight.
Press Backward button. The screen shows ↓ (backward arrow) and Roversa backs up for 2 seconds.
Press the turn arrow for the way you want Roversa to move:
If Roversa is drifting to the left, press Left button to correct.
If Roversa is drifting to the right, press Right button to correct.
Press Backward button again and keep adjusting until Roversa drives backward straight.
Press Menu button and it will show ↑ (forward arrow) with forward number and then ↓ (backward arrow) with backward number.
Write both numbers down. In your own project, put these two blocks inside the on start block and update the forwardTrim and reverseTrim with those numbers.