soil

package
v0.0.0-...-81691b0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Update

func Update(xs []*Sensor) (int, time.Time)

Update updates the Value and Time for each Sensor and returns the average value and time of measurement.

Types

type Sensor

type Sensor struct {
	Id    string    // Identifier for Sensor, e.g. "left" or "right"
	Chan  int       // Sensor Channel is connected to on the MCP3008 chip
	Value int       // Last measured value
	Time  time.Time // Time when value was measured
}

Sensors represents a soil sensors that is connected to the MCP3008 chip.

Jump to

Keyboard shortcuts

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