Description
CMPS14 – Magnetic compass with tilt compensation
Background calibration can be paused and a static calibration profile used instead.
The sensor is factory calibrated and operates with a static profile.
v5 sketches work with the sensor.
Special version with Game Vector Mode – not sensitive to iron parts and electronics.
Attention: In this mode, the compass always starts at 0.
The sketch will be included.
Changes can also be made manually – shown here in italics.
//set up communication
Wire.begin();
Serial.begin(38400);
delay(500);
//test if CMPS working
uint8_t error;
Wire.beginTransmission(CMPS14_ADDRESS);
error = Wire.endTransmission();
if (error == 0)
{
Serial.println(„Error = 0“);
Serial.print(„CMPS14 ADDRESs: 0x“);
Serial.println(CMPS14_ADDRESS, HEX);
Serial.println(„CMPS14 Ok.“);
useCMPS = true;
delay(500);
Wire.beginTransmission(CMPS14_ADDRESS); //starts communication with CMPS12
Wire.write(0x00); //command register
delay(20);
// Wire.write(0x23); // standard rotation vector
Wire.write(0x22); // game rotation vector
delay(20);
Wire.endTransmission();
}
Customs tariff number: 85423190
To connect, you will need:
3.3/5V
SDA
SCL
GND / 0V Ground
Fashion and Factory are not needed.













