From 80dd02f9d529f637d2299e1a9a88b62e08ccae29 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Mon, 4 Mar 2019 10:45:19 +0100 Subject: [PATCH] fix: dht11 sensor implementation --- pkg/sensor/dht11.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sensor/dht11.go b/pkg/sensor/dht11.go index 60df83c..a5decf0 100644 --- a/pkg/sensor/dht11.go +++ b/pkg/sensor/dht11.go @@ -29,7 +29,7 @@ func (s *DHT11Sensor) ReadHumidity() (*types.Humidity, error) { return nil, fmt.Errorf("NewDHT error: %v", err) } - humidityValue, _, err := dht.ReadRetry(11) + humidityValue, _, err := dht.Read() if err != nil { return nil, fmt.Errorf("Read error: %v", err) } @@ -60,7 +60,7 @@ func (s *DHT11Sensor) ReadTemperature() (*types.Temperature, error) { return nil, fmt.Errorf("NewDHT error: %v", err) } - _, temperatureValue, err := dht.ReadRetry(11) + _, temperatureValue, err := dht.Read() if err != nil { return nil, fmt.Errorf("Read error: %v", err) }