| 
    upm
    1.1.0
    
   Sensor/Actuator repository for libmraa (v1.5.1) 
   | 
 
API for the HMC5883L 3-Axis Digital Compass. More...
Honeywell HMC5883L is a 3-axis digital compass. Communication with 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 () | 
| const int16_t * | coordinates () | 
| upm_result_t | update () | 
| void | set_declination (float dec) | 
| float | get_declination () | 
Protected Attributes | |
| hmc5883l_context | m_hmc5883l | 
| Hmc5883l | ( | int | bus | ) | 
Creates an Hmc5883l object. The I2C address cannot be changed, and is always 0x1e (7-bit).
| bus | I2C bus number | 
| const int16_t * coordinates | ( | void | ) | 
Returns a pointer to an int[3] that contains the coordinates as ints

| upm_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.6