Documentation

Overview

Package watersensor allows interfacing with the water sensor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WaterSensor

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

WaterSensor represents a water sensor.

func New

func New(pin embd.DigitalPin) *WaterSensor

New creates a new WaterSensor struct

func (*WaterSensor) IsWet

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

IsWet determines if there is water present on the sensor

Source Files