You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the euler acts like a heading when it's turned on facing north. I wonder how I could make it so the sensor.euler[0] acts like a compass heading when not facing north originally when the IMU turned on. Thank you in advance.
The text was updated successfully, but these errors were encountered:
A brief look at the data sheet doesn't show a way to tell the sensor to compensate for the difference. But you could always do it yourself if you know the angle!
importtimeimportboardimportadafruit_bno055i2c=board.I2C()
sensor=adafruit_bno055.BNO055_I2C(i2c)
heading_offset=22.1# offset of 22.1 degreeswhileTrue:
print("Heading based on power on: {}".format(sensor.euler[0]))
print("Compass heading (offset based): {}".format(sensor.euler[0] +heading_offset))
time.sleep(1)
That would be hard coding it because the offset isn't always the same due to the initial boot up orientation being different every time the IMU is powered on.
Currently the euler acts like a heading when it's turned on facing north. I wonder how I could make it so the sensor.euler[0] acts like a compass heading when not facing north originally when the IMU turned on. Thank you in advance.
The text was updated successfully, but these errors were encountered: