fxos8700cq

package
v0.0.0-...-ab041b8 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

package fxos8700cq is a driver for the Freescale 8700 6-Axis integrated linear accelerometer and magnetometer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	AccelerometerEnabled bool
	AccelerometerRange   core.AccelRange

	MagnetometerEnabled bool
	Rate                core.DataRate
	// contains filtered or unexported fields
}

type Fxos8700cq

type Fxos8700cq struct {
	Bus embd.I2CBus
	// contains filtered or unexported fields
}

func New

func New(bus embd.I2CBus) *Fxos8700cq

New creates a new fxos8700cq sensor.

func (*Fxos8700cq) AccelReadings

func (d *Fxos8700cq) AccelReadings() <-chan *core.AccelReading

AccelReadings is a channel that will contain sensor readings after calling Start()

func (*Fxos8700cq) Activate

func (d *Fxos8700cq) Activate() error

func (*Fxos8700cq) Close

func (d *Fxos8700cq) Close() error

Close stops any period reads in progress. Call this to stop the readings that Start() begins

func (*Fxos8700cq) Configure

func (d *Fxos8700cq) Configure(conf *Configuration) error

func (*Fxos8700cq) IsPresent

func (d *Fxos8700cq) IsPresent() bool

IsPresent returns true if it looks like we were able to see the sensor

func (*Fxos8700cq) MagReadings

func (d *Fxos8700cq) MagReadings() <-chan *core.MagReading

MagReadings is a channel that will contain sensor readings after calling Start()

func (*Fxos8700cq) ReadAccel

func (d *Fxos8700cq) ReadAccel() (*core.AccelReading, error)

func (*Fxos8700cq) ReadAccelAndMag

func (d *Fxos8700cq) ReadAccelAndMag() (*core.AccelReading, *core.MagReading, error)

func (*Fxos8700cq) ReadMag

func (d *Fxos8700cq) ReadMag() (*core.MagReading, error)

func (*Fxos8700cq) Start

func (d *Fxos8700cq) Start() error

Start produces a stream of gyroscope readings in the Readings() channel

Jump to

Keyboard shortcuts

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