doorbell

package
v0.0.0-...-613bafb Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Value int
}

func NewDepressEvent

func NewDepressEvent() Event

func NewEvent

func NewEvent() Event

func NewPressEvent

func NewPressEvent() Event

func (*Event) RingRing

func (e *Event) RingRing() bool

type MQTTPublisher

type MQTTPublisher struct {
	Broker string
	Name   string
	// contains filtered or unexported fields
}

func NewMQTTPublisher

func NewMQTTPublisher(broker string, name string) MQTTPublisher

func (*MQTTPublisher) Start

func (p *MQTTPublisher) Start(events <-chan Event)

func (*MQTTPublisher) Stop

func (p *MQTTPublisher) Stop()

type Sensor

type Sensor struct {
	Pin    int
	Output chan Event
}

func NewSensor

func NewSensor(pin int, output chan Event) Sensor

func (*Sensor) Start

func (s *Sensor) Start()

Blocks

func (*Sensor) Stop

func (s *Sensor) Stop()

Jump to

Keyboard shortcuts

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