Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DetectHandler ¶
type DetectHandler func()
DetectHandler event handler whenever the motion sensor detects motion
type Sensor ¶
type Sensor struct {
// contains filtered or unexported fields
}
Sensor handles interfacing with the HC-SR501 PIR motion sensor
func NewSensor ¶
func NewSensor(pin string, handler DetectHandler) (*Sensor, error)
NewSensor creates and initializes a new Motion Sensor
Click to show internal directories.
Click to hide internal directories.