helpers

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SensorsPath string = "/sys/bus/w1/devices"

Functions

func GetAllSensors

func GetAllSensors(fs afero.Afero) ([]string, error)

func SendReadings

func SendReadings(readings []SensorReading, endpoint string, token string, verbose bool) error

Types

type SensorReading

type SensorReading struct {
	SensorHwId  string  `json:"hwId"`
	Temperature float32 `json:"temperature"`
	Resolution  int     `json:"resolution"`
}

func GetReadings

func GetReadings(fs afero.Afero, sensors []string) ([]SensorReading, error)

Jump to

Keyboard shortcuts

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