|
HMC5883L
0.2
Library for I2C communication with HMC5883L over Arduino
|
Macros | |
| #define | HMC5883L_ADDR 0x1E |
| #define | ConfigRegisterA 0x00 |
| #define | ConfigRegisterB 0x01 |
| #define | ModeRegister 0x02 |
| #define | DataRegister 0x03 |
| #define | StatusRegister 0x09 |
| #define ConfigRegisterA 0x00 |
Register address for Config Register A, which contains:
| Location | Description |
|---|---|
| 5 - 6 | Number of samples averaged, see HMC5883L::setAveragingRate() |
| 2 - 4 | Data output rate, see HMC5883L::setOutputRate() |
| 0 - 1 | Bias measurement register, see HMC5883L::setBiasMode() |
| #define ConfigRegisterB 0x01 |
Register address for Config Register A, which contains:
| Location | Description |
|---|---|
| 5 - 7 | Gain configuration, see HMC5883L::setGain() |
| 0 - 4 | Not used - must be cleared for proper operation |
| #define DataRegister 0x03 |
Starting address for the data registers, which are, in order: DXRA (MSB), DXRB (LSB), DZRA (MSB), DZRB (LSB), DYRA (MSB), DYRB (LSB).
| #define HMC5883L_ADDR 0x1E |
The I2C address of all HMC5883L digital magnetometers
| #define ModeRegister 0x02 |
Register address for the mode register, which contains:
| Location | Description |
|---|---|
| 7 | High speed I2C mode bit, see HMC5883L::setHighSpeedI2CMode() |
| 1 - 6 | Not used - cleared by default |
| 0 - 1 | Measurement mode select bits, see HMC5883L::setMeasurementMode() |
| #define StatusRegister 0x09 |
Register address for the status register, which contains the LOCK [1] and RDY [0]. See getStatus().