I've seen similar issues posted around but I have been unable to get anything to work.
My project is a Pi with a Sense Hat sitting on top of a Roomba, which is controlled through the Pi. I am trying to have the Roomba rotate 90 degrees to the left from where it starts and then stop. I have it rotating and reading in the current degree, but the magnetometer never reports a value outside of the range 70-150, when it hits the edge of that range it just goes in reverse from there (ex: 71 -> 70 -> 71 again).
I have calibrated the sense hat twice now, same results both times. I am noticing one thing, which is that in the calibration example on the Pi site (https://www.raspberrypi.org/documentati ... sense-hat/) it shows the following values:
Min x: 51.60 min y: 69.39 min z: 65.91
Max x: 53.15 max y: 70.97 max z: 67.97
and the values I got were never more than low 40s. Did I somehow calibrate it wrong? I moved it every way I possibly could and the values stopped changing.
I am using dir = sense.get_compass() to get the degree value.