|
upm
0.2.0
Sensor/Actuator repository for libmraa (v0.6.1)
|
C++ API for Hmc5883l (3-axis digital compass) More...
The Honeywell HMC5883L is a 3-axis digital compass. Communication with the HMC5883L is simple and all done through an I2C interface. Different breakout boards are available, typically a 3V supply is all that is needed to power the sensor.
Public Member Functions | |
| Hmc5883l (int bus) | |
| float | direction () |
| float | heading () |
| int16_t * | coordinates () |
| mraa_result_t | update () |
| void | set_declination (float dec) |
| float | get_declination () |
| Hmc5883l | ( | int | bus | ) |
Creates a Hmc5883l object
| bus | number of used i2c bus |

| int16_t * coordinates | ( | void | ) |
Returns a pointer to an int[3] that contains the coordinates as ints
| mraa_result_t update | ( | void | ) |
Updates the values by reading from i2c

| void set_declination | ( | float | dec | ) |
Sets the magnetic declination for better calibration
| float get_declination | ( | ) |
Gets the current magnetic declination value
1.8.9.1