led

package
v0.0.0-...-7aacf5e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CHAN0 = byte(0x0C)
View Source
const CHAN1 = byte(0x0E)
View Source
const CMD_OFF = byte(0x00)
View Source
const CMD_ON = byte(0x03)
View Source
const HIGH_LONG = byte(0x12) // LowLight x16 Gain 402 miliseconds
View Source
const HIGH_MED = byte(0x11) // LowLight x16 Gain 100 miliseconds
View Source
const HIGH_SHORT = byte(0x10) // LowLight x16 Gain 13.7 miliseconds
View Source
const LOW_LONG = byte(0x02) // x1 Gain 402 miliseconds
View Source
const LOW_MED = byte(0x01) // x1 Gain 101 miliseconds
View Source
const LOW_SHORT = byte(0x00) // x1 Gain 13.7 miliseconds
View Source
const TSL_ADDR = int(0x39)
View Source
const TSL_CMD = byte(0x80)

Variables

This section is empty.

Functions

func Read

func Read(verbose bool, gain int, treshold uint64, device string, c chan Status)

func ReadLight

func ReadLight(gainLevel int, dev string) uint64

Types

type Status

type Status struct {
	IsLit    bool   `json:"isLit"`
	Value    uint64 `json:"value"`
	Treshold uint64 `json:"treshold"`
}

Jump to

Keyboard shortcuts

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