pyupm_hmc5883l module

class pyupm_hmc5883l.Hmc5883l(bus)[source]

Bases: object

API for the HMC5883L 3-Axis Digital Compass.

ID: hmc5883l

Name: 3-axis Digital Compass

Other Names: Grove 3-Axis Digital Compass

Category: compass

Manufacturer: seeed

Connection: i2c

Link:http://wiki.seeed.cc/Grove-3-Axis_Compass_V1.0/

Kit: robok HoneywellHMC5883L 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.

C++ includes: hmc5883l.hpp

coordinates()[source]

const int16_t * coordinates()

Returns a pointer to an int[3] that contains the coordinates as ints

*int to an int[3]

direction()[source]

float direction()

get_declination()[source]

float get_declination()

Gets the current magnetic declination value

Magnetic declination as a floating-point value

heading()[source]

float heading()

set_declination(dec)[source]

void set_declination(float dec)

Sets the magnetic declination for better calibration

update()[source]

upm_result_t update()

Updates the values by reading from I2C

0 if successful

class pyupm_hmc5883l.int16Array(nelements)[source]

Bases: object

cast()[source]
static frompointer()