Skip to content

Commit d6201ea

Browse files
committed
only check conversion in single mode
1 parent 5ba760c commit d6201ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adafruit_ads1x15/ads1x15.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ def _read(self, pin):
158158
config |= _ADS1X15_CONFIG_COMP_QUE_DISABLE
159159
self._write_register(_ADS1X15_POINTER_CONFIG, config)
160160

161-
while not self._conversion_complete():
162-
time.sleep(0.01)
161+
if self.mode == Mode.SINGLE:
162+
while not self._conversion_complete():
163+
pass
163164

164165
return self.get_last_result()
165166

0 commit comments

Comments
 (0)