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

us020: decouple from bmp085 and default to 25 C when we cannot detect

the ambient temperature
This commit is contained in:
Karan Misra 2014-01-09 03:39:06 +05:30
parent 1b5a3a40c3
commit 1b6c346d40
2 changed files with 44 additions and 32 deletions

View file

@ -8,11 +8,11 @@ import (
)
func main() {
rangeFinder := us020.New(10, 9)
defer rangeFinder.Close()
rf := us020.New(10, 9, nil)
defer rf.Close()
for {
distance, err := rangeFinder.Distance()
distance, err := rf.Distance()
if err != nil {
log.Panic(err)
}