mirror of
https://github.com/kidoman/embd
synced 2025-07-03 11:57:38 +02:00
-Removed low resolution mode from bh1750fvi package
-Fixed bugs with i2c commands used for data acquisition
This commit is contained in:
parent
2ac61dad95
commit
898041c4ce
2 changed files with 72 additions and 76 deletions
|
@ -14,8 +14,7 @@ func main() {
|
|||
log.Panic(err)
|
||||
}
|
||||
|
||||
lightingSensor := bh1750Fvi.New("H", bus)
|
||||
|
||||
lightingSensor := bh1750Fvi.New(bh1750Fvi.High, bus)
|
||||
defer lightingSensor.Close()
|
||||
|
||||
for {
|
||||
|
@ -23,7 +22,8 @@ func main() {
|
|||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
log.Printf("Lighting is %v", lighting, "lx")
|
||||
log.Printf("Lighting is %v lx", lighting)
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue