EDIT:
I may have made some progress. Using the python library quick2wire
I have successfully connected to the compass:
>>> from quick2wire.i2c import I2CMaster, writing_bytes, reading
>>> address = 0x21 # detected using `sudo i2cdetect -y 0`
>>> cmd = 0x41 # 'A'
>>> master = I2CMaster()
>>> master.transaction(writing_bytes(address, cmd))
[]
>>> master.transaction(reading(address, 2))
[b'\x03s']
Repeatedly running the last two lines seems to produce different values when I move the compass. The numbers also seem self consistent. By this I mean the same byte value appears if I move the compass away from and back to a direction.
How do I convert this bytes object to a compass heading value?