Documentation ¶
Overview ¶
Package adxl345 implements the MovementSensor interface for the ADXL345 accelerometer.
Package adxl345 is Linux-only.
Package adxl345 is for an ADXL345 accelerometer. This file is for the interrupt-based functionality on the chip.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.36
type Config struct { I2cBus string `json:"i2c_bus"` UseAlternateI2CAddress bool `json:"use_alternate_i2c_address,omitempty"` BoardName string `json:"board,omitempty"` SingleTap *TapConfig `json:"tap,omitempty"` FreeFall *FreeFallConfig `json:"free_fall,omitempty"` }
Config is a description of how to find an ADXL345 accelerometer on the robot.
type FreeFallConfig ¶ added in v0.2.36
type FreeFallConfig struct { AccelerometerPin int `json:"accelerometer_pin"` InterruptPin string `json:"interrupt_pin"` Threshold float32 `json:"threshold,omitempty"` Time float32 `json:"time_ms,omitempty"` }
FreeFallConfig is a description of the configs for free fall registers.
type InterruptID ¶ added in v0.2.26
type InterruptID = uint8
InterruptID is a type of interrupts available on ADXL345.
type TapConfig ¶ added in v0.2.36
type TapConfig struct { AccelerometerPin int `json:"accelerometer_pin"` InterruptPin string `json:"interrupt_pin"` ExcludeX bool `json:"exclude_x,omitempty"` ExcludeY bool `json:"exclude_y,omitempty"` ExcludeZ bool `json:"exclude_z,omitempty"` Threshold float32 `json:"threshold,omitempty"` Dur float32 `json:"dur_us,omitempty"` }
TapConfig is a description of the configs for tap registers.
Click to show internal directories.
Click to hide internal directories.