1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

bring in the idea of a hardware abstraction layer

This commit is contained in:
Karan Misra 2014-02-27 04:24:53 +05:30
parent b4de382833
commit b5e2d0acc7
35 changed files with 994 additions and 971 deletions

View file

@ -53,9 +53,6 @@ type bh1750fvi struct {
poll int
}
// Default instance for BH1750FVI sensor
var Default = New(High, i2c.Default)
// Supports three modes:
// "H" -> High resolution mode (1lx), takes 120ms (recommended).
// "H2" -> High resolution mode 2 (0.5lx), takes 120ms (only use for low light).
@ -149,23 +146,3 @@ func (d *bh1750fvi) Close() {
func (d *bh1750fvi) SetPollDelay(delay int) {
d.poll = delay
}
// SetPollDelay sets the delay between run of data acquisition loop.
func SetPollDelay(delay int) {
Default.SetPollDelay(delay)
}
// Lighting returns the ambient lighting in lx.
func Lighting() (lighting float64, err error) {
return Default.Lighting()
}
// Run starts continuous sensor data acquisition loop.
func Run() (err error) {
return Default.Run()
}
// Close.
func Close() {
Default.Close()
}