-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Description
Recently we been getting versions circulating over the market of the QMC5883P said to be the replacement of the QMC5883
and seeing Ardupilot already implemented this months ago. seeing that new FC or GPS would come package with these in months to come
here is the comparison of the 2
QMC5883
#if defined(QMC5883)
#define MAG_ADDRESS 0x0D
#define MAG_DATA_REGISTER 0x00
//REG CONTROL
#define MAG_CTRL_REG1 0x09
#define QMC_MODE 0xC1 // 11 00 00 01OSR=64(11); Range=2G(00); ODR=10Hz(00); MODE=Cont(01)
#define MAG_CTRL_REG2 0x0A
void Mag_init() {
i2c_writeReg(MAG_ADDRESS,0x0B,0x01);
i2c_writeReg(MAG_ADDRESS,MAG_CTRL_REG1,QMC_MODE);
}
QMC5883P
#if defined(QMC5883P)
#define MAG_ADDRESS 0x2C
#define MAG_DATA_REGISTER 0x01
//REG CONTROL
#define MAG_CTRL_REG1 0x0A
#define QMC_MODE 0x09 // 11 00 00 01OSR=64(11); Range=2G(00); ODR=10Hz(00); MODE=Cont(01)
#define MAG_CTRL_REG2 0x0B
void Mag_init() {
i2c_writeReg(MAG_ADDRESS,0x0D,0x40);
i2c_writeReg(MAG_ADDRESS,0x29,0x06);
i2c_writeReg(MAG_ADDRESS,MAG_CTRL_REG1, 0xCF);
i2c_writeReg(MAG_ADDRESS,MAG_CTRL_REG2, 0x00);
i2c_writeReg(MAG_ADDRESS,MAG_CTRL_REG1,QMC_MODE);
}
Data sheet
Recent reports from Arduino forum
https://forum.arduino.cc/t/are-all-new-gy-270-board-magnetometers-now-fake/1379276
Metadata
Metadata
Assignees
Labels
No labels