bh1750fvi

package
v0.0.0-...-d3d8c0c Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package BH1750FVI allows interfacing with the BH1750FVI ambient light sensor through I2C.

Index

Constants

View Source
const (
	High  = "H"
	High2 = "H2"
)

accuracy = sensorValue/actualValue] (min = 0.96, typ = 1.2, max = 1.44

Variables

This section is empty.

Functions

This section is empty.

Types

type BH1750FVI

type BH1750FVI struct {
	Bus  embd.I2CBus
	Poll int
	// contains filtered or unexported fields
}

BH1750FVI represents a BH1750FVI ambient light sensor.

func New

func New(mode string, bus embd.I2CBus) *BH1750FVI

New returns a BH1750FVI sensor at the specific resolution mode.

func NewHigh2Mode

func NewHigh2Mode(bus embd.I2CBus) *BH1750FVI

NewHighMode returns a BH1750FVI sensor on high resolution mode2 (0.5lx resolution)

func NewHighMode

func NewHighMode(bus embd.I2CBus) *BH1750FVI

NewHighMode returns a BH1750FVI sensor on high resolution mode (1lx resolution)

func (*BH1750FVI) Close

func (d *BH1750FVI) Close()

Close.

func (*BH1750FVI) Lighting

func (d *BH1750FVI) Lighting() (float64, error)

Lighting returns the ambient lighting in lx.

func (*BH1750FVI) Run

func (d *BH1750FVI) Run()

Run starts continuous sensor data acquisition loop.

Jump to

Keyboard shortcuts

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