sensors

package
v0.0.0-...-5dabda3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const SENSORS_LIST_KEY = "/wff/v1/sp1/sensors/"
View Source
const SENSOR_KEY = "/wff/v1/sp1/"
View Source
const SOUND_THRESHOLD = 129

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptorReader

type AdaptorReader interface {
	gobot.Adaptor
	AnalogRead(string) (val int, err error)
	DigitalRead(string) (val int, err error)
}

type Broker

type Broker interface {
	Connect() error
	Publish(string, []byte)
	Subscribe(string, func([]byte))
	IsConnected() bool
	Disconnect()
}

type SensorService

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

func Initialize

func Initialize(gobot *gobot.Gobot, adapter AdaptorReader, broker Broker) *SensorService

func (*SensorService) NewLightSensor

func (s *SensorService) NewLightSensor(pin string)

func (*SensorService) NewSoundSensor

func (s *SensorService) NewSoundSensor(pin string)

func (*SensorService) NewTouchSensor

func (s *SensorService) NewTouchSensor(pin string)

type Sensors

type Sensors struct {
	List []string `json:"sensors"`
}

Jump to

Keyboard shortcuts

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