Hi all. I've had some limited success in getting my CMPS14 to return various headings, mostly using Serial communication. I've tried both 8 and 16 bit resolutions and can get readings of 0 - 255 for 8-bit and 0 - 3650 for 16-bit. The problem is the headings are far from accurate (20 to 40 degrees off).
The data sheet (attached) discusses calibration (I2C mode) but I do not understand the documentation. Page 6 reads: "To achieve background calibration the user just needs to turn the functionality on and perform the required simple movements." I've tried sending the "setup bytes" 0x98, etc., with 20 millisecond pauses. But I don't understand the rest of the documentation stating, "remembering to pick up the response byte OK (0x55) after each byte". "You can then pass the setup byte to the command register, it takes the form: "
I'm embarrassed to admit that this goes over my head by several feet. Has anyone dealt with calibrating this particular compass module? If so, do you have any working code that I could use? Thanks so much. Meanwhile, I will keep plugging away at it.
The data sheet (attached) discusses calibration (I2C mode) but I do not understand the documentation. Page 6 reads: "To achieve background calibration the user just needs to turn the functionality on and perform the required simple movements." I've tried sending the "setup bytes" 0x98, etc., with 20 millisecond pauses. But I don't understand the rest of the documentation stating, "remembering to pick up the response byte OK (0x55) after each byte". "You can then pass the setup byte to the command register, it takes the form: "
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
Calibration Config | 1 | x | x | Periodic | x | Gyro | Accel | Mag |
Auto Save |
I'm embarrassed to admit that this goes over my head by several feet. Has anyone dealt with calibrating this particular compass module? If so, do you have any working code that I could use? Thanks so much. Meanwhile, I will keep plugging away at it.
Attachments
-
233.1 KB Views: 4