embd: github.com/kidoman/embd/sensor/watersensor Index | Files

package watersensor

import "github.com/kidoman/embd/sensor/watersensor"

Package watersensor allows interfacing with the water sensor.

Index

Package Files

watersensor.go

type WaterSensor Uses

type WaterSensor struct {
    Pin embd.DigitalPin
    // contains filtered or unexported fields
}

WaterSensor represents a water sensor.

func New Uses

func New(pin embd.DigitalPin) *WaterSensor

New creates a new WaterSensor struct

func (*WaterSensor) IsWet Uses

func (d *WaterSensor) IsWet() (bool, error)

IsWet determines if there is water present on the sensor

Package watersensor imports 3 packages (graph). Updated 2016-07-16. Refresh now. Tools for package owners.