fxas21002c

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 fxas21001c is a driver for the Freescale 21002c 3-Axis gyroscope.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Range core.GyroRange

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

type Fxas21002c

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

func New

func New(bus embd.I2CBus) *Fxas21002c

New creates a new fxas21002c sensor.

func (*Fxas21002c) Activate

func (d *Fxas21002c) Activate() error

func (*Fxas21002c) Close

func (d *Fxas21002c) Close() error

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

func (*Fxas21002c) Configure

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

func (*Fxas21002c) IsPresent

func (d *Fxas21002c) IsPresent() bool

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

func (*Fxas21002c) ReadGyro

func (d *Fxas21002c) ReadGyro() (*core.GyroReading, error)

func (*Fxas21002c) Readings

func (d *Fxas21002c) Readings() <-chan *core.GyroReading

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

func (*Fxas21002c) Start

func (d *Fxas21002c) 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