hcsr501

package
v0.0.0-...-0d0e327 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hcsr501 allows interfacing with the HC-SR501 PIR Sensor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HCSR501

type HCSR501 struct {
	TriggerPin embd.DigitalPin
	// contains filtered or unexported fields
}

HCSR501 represents a HCSR501 ultrasonic range finder.

func New

func New(triggerPin embd.DigitalPin) *HCSR501

New creates a new HCSR501 interface.

func (*HCSR501) Close

func (d *HCSR501) Close() error

Close.

func (*HCSR501) Detect

func (d *HCSR501) Detect() (bool, error)

Detect returns true if motion was detected.

Jump to

Keyboard shortcuts

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