Question about the Primehub.imu.heading() and Primehub.imu.reset_heading() #1767
Unanswered
Digital-Dominators
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Thanks for reporting! We will look into it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We are new to Pybricks (Our FLL team used SpikePrime block coding last season and this is our 2nd season).
I was testing the imu.heading() and imu.reset_heading() method, and I did the following:
I made 2 60-degree turns and reset the heading in the middle. The imu.heading() was reset to 0 before the 2nd turn. But after the 2nd 60 dgree turn, it became 120 (which I expect to be 60). I wonder if it is a bug (which isn't likely as it is a very common method), or it is me who misunderstood these 2 functions imu.heading() and imu.reset_heading().
Could someone help me here and let me know how to code the 2nd turn to get the heading() reading to 60 after the turn?
This is the print out
(Also I noticed, the robot turned and accelerated much faster in the 2nd turn, though I didn't change any turn_rate or acceleration parameters in the middle),
Beta Was this translation helpful? Give feedback.
All reactions