fix: dht11 sensor implementation
This commit is contained in:
parent
fd638452ac
commit
80dd02f9d5
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user