Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Configuration register bits CTRL_REG0 = 0x1F CTRL_REG1 = 0x20 CTRL_REG2 = 0x21 CTRL_REG3 = 0x22 CTRL_REG4 = 0x23 CTRL_REG5 = 0x24 CTRL_REG6 = 0x25 CTRL_REG7 = 0x26 // Acceleromter outputs: OUT_X_L_A = 0x28 OUT_X_H_A = 0x29 OUT_Y_L_A = 0x2A OUT_Y_H_A = 0x2B OUT_Z_L_A = 0x2C OUT_Z_H_A = 0x2D // Accelerometer scale ACCEL_SCALE = 2 // +/- 2gs )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envirophat ¶
Envirophat represents a Pimoroni enviro-phat with multiple sensor types.
func (*Envirophat) Accelerometer ¶
func (d *Envirophat) Accelerometer() (x float64, y float64, z float64, err error)
Accelerometer returns the current accelerometer vector
Click to show internal directories.
Click to hide internal directories.