GlobeRat
Posts: 1
Joined: Fri Jan 08, 2016 6:19 am

SenseHat:gyros only, no magnetometer

Fri Jan 08, 2016 6:48 am

Hi,

I bought a SenseHat recently and have been working through some proof-of-concept projects for work with it.

We'd like to be able to set up 2 or more Raspberry Pi's with SenseHat's so they line up exactly. They will be moved often and will be in basements mounted on steel near somewhat strong magnetic fields, so we don't feel we would be able to trust the magnetometer.

My question is this: can we turn off the magnetometer and calibrate the Pi's for orientation in x,y,z with just the gyros?

I've been looking at the following example for the API reference for SenseHat at:
https://pythonhosted.org/sense-hat/api/#imu-sensor

Is this the right path to follow?

My thoughts are:
Line up Pi's in line
Shut off all sensors with the set_mu_config command
Wait X amount of time for the gyros to spin down
With set_imu_config(False, True, False) turn on the gyros again


Will the yaw axis for all the Pi's match?

I hope I'm being clear. Thanks for any and all help.

This is example code I found.

get_gyroscope example

from sense_hat import SenseHat

sense = SenseHat()
gyro_only = sense.get_gyroscope()
print("p: {pitch}, r: {roll}, y: {yaw}".format(**gyro_only))

# alternatives
print(sense.gyro)
print(sense.gyroscope)

Return to “Astro Pi”