Python code for CMPS11-Tilt Compensated Magnetic Compass

Does anybody have Python code to use this compass on a Raspberry Pi?

Couldnt find anything specifically Python (surprised), but if you know how to do I2C or serial under Python then it’s just writing and reading from the registers. Not sure a Library would help you much more than that as fairly straight forward chip to talk to.

Arduino code to get idea from
https://www.robot-electronics.co.uk/files/arduino_cmps11_i2c.ino

1 Like

Posting to this forum might be source of some assistance

1 Like