Skip to main content

Lesson F1.3: Hub Heading and Yaw Reset

The Prime Hub contains a motion sensor that can report yaw. Resetting yaw defines the current direction as zero; it does not physically rotate the robot. A later reading tells how far the Hub has turned relative to that chosen zero.

A simple correction compares target heading with measured heading, then makes a small turn in the error's direction. Avoid rapid full-power corrections around zero because they can cause oscillation.

Official hardware activity

Use the SPIKE App motion-sensor tutorial, then compare its yaw value with the turn work from Competition Ready.

Simulator practice

Reset yaw, turn 70 degrees, and store the yaw reporter in a variable. Add an if statement that makes a small correction when the value is below 85 degrees.

Loading the FLL block workspace...

Try it in the SPIKE App

Keep the Hub level and still during startup. Test the correction at two speeds and record whether it overshoots.

Ready to move on?

Only mark complete if you genuinely understand the material. Your progress will be saved in this browser.

Stuck on this lesson?

Ask about anything on this page. It can see which lesson you have open and which part you are reading.