Skip to content

Commit

Permalink
Merge pull request #28 from caternuson/iss26_continuous
Browse files Browse the repository at this point in the history
Support continuous mode.
tannewt authored May 9, 2019
2 parents e439d7e + cf6cd50 commit 9e503e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adafruit_ads1x15/ads1x15.py
Original file line number Diff line number Diff line change
@@ -31,7 +31,6 @@
__version__ = "0.0.0-auto.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15.git"

import time
from micropython import const
from adafruit_bus_device.i2c_device import I2CDevice

@@ -158,8 +157,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()

0 comments on commit 9e503e7

Please sign in to comment.