Documentation ¶
Overview ¶
Package lsm303 allows interfacing with the LSM303 magnetometer.
Index ¶
Constants ¶
View Source
const ( MagHz75 = 0x00 // ODR = 0.75 Hz Mag1Hz5 = 0x04 // ODR = 1.5 Hz Mag3Hz = 0x08 // ODR = 3 Hz Mag7Hz5 = 0x0C // ODR = 7.5 Hz Mag15Hz = 0x10 // ODR = 15 Hz Mag30Hz = 0x14 // ODR = 30 Hz Mag75Hz = 0x18 // ODR = 75 Hz MagNormal = 0x00 // Normal mode MagPositiveBias = 0x01 // Positive bias mode MagNegativeBias = 0x02 // Negative bias mode MagCRADefault = Mag15Hz | MagNormal // 15 Hz and normal mode is the default MagContinuous = 0x00 // Continuous conversion mode MagSingle = 0x01 // Single conversion mode MagSleep = 0x03 // Sleep mode MagMRDefault = MagContinuous // Continuous conversion is the default )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LSM303 ¶
LSM303 represents a LSM303 magnetometer.
func New ¶
New creates a new LSM303 interface. The bus variable controls the I2C bus used to communicate with the device.
Click to show internal directories.
Click to hide internal directories.