embd: github.com/kidoman/embd/sensor/bh1750fvi Index | Files

package bh1750fvi

import "github.com/kidoman/embd/sensor/bh1750fvi"

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

Index

Package Files

bh1750fvi.go

Constants

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

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

type BH1750FVI Uses

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

BH1750FVI represents a BH1750FVI ambient light sensor.

func New Uses

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

New returns a BH1750FVI sensor at the specific resolution mode.

func NewHigh2Mode Uses

func NewHigh2Mode(bus embd.I2CBus) *BH1750FVI

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

func NewHighMode Uses

func NewHighMode(bus embd.I2CBus) *BH1750FVI

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

func (*BH1750FVI) Close Uses

func (d *BH1750FVI) Close()

Close.

func (*BH1750FVI) Lighting Uses

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

Lighting returns the ambient lighting in lx.

func (*BH1750FVI) Run Uses

func (d *BH1750FVI) Run()

Run starts continuous sensor data acquisition loop.

Package bh1750fvi imports 3 packages (graph). Updated 2016-07-31. Refresh now. Tools for package owners.