We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a0a91 commit ede42c4Copy full SHA for ede42c4
adafruit_us100.py
@@ -66,6 +66,7 @@ def distance(self):
66
"""
67
for _ in range(2): # Attempt to read twice.
68
self._uart.write(bytes([0x55]))
69
+ time.sleep(0.1)
70
data = self._uart.read(2) # 2 byte return for distance.
71
if data: # If there is a reading, exit the loop.
72
break
@@ -87,6 +88,7 @@ def temperature(self):
87
88
"""Return the on-chip temperature, in Celsius"""
89
90
self._uart.write(bytes([0x50]))
91
92
data = self._uart.read(1) # 1 byte return for temp
93
94
0 commit comments