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:
parent
1b5a3a40c3
commit
1b6c346d40
2 changed files with 44 additions and 32 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue