mpu6050

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package mpu6050 implements the movementsensor interface for an MPU-6050 6-axis accelerometer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMpu6050

func NewMpu6050(
	ctx context.Context,
	deps registry.Dependencies,
	rawConfig config.Component,
	logger golog.Logger,
) (movementsensor.MovementSensor, error)

NewMpu6050 constructs a new Mpu6050 object.

Types

type AttrConfig

type AttrConfig struct {
	BoardName              string `json:"board"`
	I2cBus                 string `json:"i2c_bus"`
	UseAlternateI2CAddress bool   `json:"use_alt_i2c_address,omitempty"`
}

AttrConfig is used to configure the attributes of the chip.

func (*AttrConfig) Validate

func (cfg *AttrConfig) Validate(path string) ([]string, error)

Validate ensures all parts of the config are valid, and then returns the list of things we depend on.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL