Knowledge Base

Get Gyro Reset / Reset Gyro Block

output-onlinepngtools__231_.png  This block works for both EV3 Robot and Ruby Robot!  output-onlinepngtools__101_.png



The Get Gyro Reset / Reset Gyro block is extremely useful whenever you want to repeat a turn, without accumulating the total degrees turned. For example: If you need the robot to turn 90 degrees 4 times.

This example code drives the robot along a square path. The Gyro sensor helps the robot turn 90 degrees at each corner using a Wait Until Gyro block (note: because the robot keeps turning a tiny bit after the Gyro sensor senses 82 degrees, the end result will be a 90-degree turn).

The Reset block is located right before the turn, to make sure that the Gyro sensor is at 0 degrees. This makes sure that the turn is as accurate as possible, since the robot starts at 0; otherwise, accumulated errors might interfere with the turning process.


Note that when using loops, the Reset block should be placed inside the loop so that each iteration of the loop is as accurate as possible.


Was this article helpful?
0 out of 0 found this helpful


Please sign in to leave a comment.