pir

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sensor

type Sensor struct {
	// contains filtered or unexported fields
}

Sensor represents a PIR sensor.

func NewSensor

func NewSensor(conf SensorConfig) Sensor

NewSensor creates a new sensor that

func (*Sensor) Read

func (s *Sensor) Read() chan sensor.Output

Read starts a separate goroutine that will write Output on the returned channel.

func (*Sensor) Setup

func (s *Sensor) Setup() error

Setup initializes the PIR sensor.

type SensorConfig

type SensorConfig struct {
	PinIn  string
	PinOut string
}

SensorConfig holds the configuration parameters of a PIR Sensor.

Jump to

Keyboard shortcuts

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