Skip to content

Commit

Permalink
only check conversion in single mode
Browse files Browse the repository at this point in the history
  • Loading branch information
caternuson committed Mar 7, 2019
1 parent 5ba760c commit d6201ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adafruit_ads1x15/ads1x15.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ def _read(self, pin):
config |= _ADS1X15_CONFIG_COMP_QUE_DISABLE
self._write_register(_ADS1X15_POINTER_CONFIG, config)

while not self._conversion_complete():
time.sleep(0.01)
if self.mode == Mode.SINGLE:
while not self._conversion_complete():
pass

return self.get_last_result()

Expand Down

0 comments on commit d6201ea

Please sign in to comment.