Commit 0d01cb08 authored by Matthieu Cattin's avatar Matthieu Cattin

Fix bug of first temperature read after startup, was not waiting for convertion time.

parent 217e1b7d
......@@ -73,7 +73,7 @@ class CDS18B20:
err = self.access(serial_number)
#print('[DS18B20] Write function command %.2X') % self.CONVERT_TEMP
err = self.onewire.write_byte(self.port, self.CONVERT_TEMP)
time.sleep(0.001)
time.sleep(0.8)
err = self.access(serial_number)
#print('[DS18B20] Write function command %.2X') % self.READ_SCRATCHPAD
err = self.onewire.write_byte(self.port, self.READ_SCRATCHPAD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment