bmp180: change method names/signature for obtaining temperature and pressure uniform with other similar drivers

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-04-24 10:57:30 +02:00
parent f6b9080f9e
commit cd992bd7d6
4 changed files with 17 additions and 15 deletions
+4 -3
View File
@@ -3,8 +3,9 @@ package main
import (
"time"
"github.com/tinygo-org/drivers/bmp180"
"machine"
"github.com/tinygo-org/drivers/bmp180"
)
func main() {
@@ -20,10 +21,10 @@ func main() {
println("BMP180 detected")
for {
temp, _ := sensor.Temperature()
temp, _ := sensor.ReadTemperature()
println("Temperature:", float32(temp)/1000, "ºC")
pressure, _ := sensor.Pressure()
pressure, _ := sensor.ReadPressure()
println("Pressure", float32(pressure)/100000, "hPa")
time.Sleep(2 * time.Second)