Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support continuous mode. #28

Merged
merged 2 commits into from
May 9, 2019
Merged

Support continuous mode. #28

merged 2 commits into from
May 9, 2019

Conversation

caternuson
Copy link
Contributor

Fix for #26

Puts the wait for conversion loop in a conditional so it doesn't get used when running in continuous mode.

BEFORE (gets stuck in loop)

Adafruit CircuitPython 3.1.2 on 2019-01-07; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board
>>> import busio
>>> import adafruit_ads1x15.ads1115 as ADS
>>> from adafruit_ads1x15.ads1x15 import Mode
>>> from adafruit_ads1x15.analog_in import AnalogIn
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> ads = ADS.ADS1115(i2c)
>>> chan = AnalogIn(ads, ADS.P0)
>>> chan.value
8187
>>> ads.mode
256
>>> ads.mode = Mode.CONTINUOUS
>>> ads.mode
0
>>> chan.value

AFTER (yeah!)

Adafruit CircuitPython 3.1.2 on 2019-01-07; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board
>>> import busio
>>> import adafruit_ads1x15.ads1115 as ADS
>>> from adafruit_ads1x15.ads1x15 import Mode
>>> from adafruit_ads1x15.analog_in import AnalogIn
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> ads = ADS.ADS1115(i2c)
>>> chan = AnalogIn(ads, ADS.P0)
>>> chan.value
8189
>>> ads.mode
256
>>> ads.mode = Mode.CONTINUOUS
>>> ads.mode
0
>>> chan.value
8189
>>>

@caternuson caternuson requested a review from a team March 7, 2019 20:53
@caternuson caternuson closed this Mar 30, 2019
@caternuson caternuson deleted the iss26_continuous branch March 30, 2019 00:30
@caternuson
Copy link
Contributor Author

Oops. Looks like I accidentally deleted / closed this doing some house keeping? Not sure. Wasn't intentional. I guess if anyone actually still wants this, respond here and I'll see if I can bring it back.

@caternuson caternuson restored the iss26_continuous branch May 4, 2019 06:34
@caternuson caternuson reopened this May 4, 2019
@caternuson caternuson mentioned this pull request May 4, 2019
@caternuson
Copy link
Contributor Author

OK. It's back. :)

@caternuson caternuson mentioned this pull request May 8, 2019
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@tannewt tannewt merged commit 9e503e7 into adafruit:master May 9, 2019
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 10, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 2.0.0 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#28 from caternuson/iss26_continuous
  > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#31 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_AMG88xx to 1.1.3 from 1.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_AMG88xx#14 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_BNO055 to 3.0.6 from 3.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#27 from peterhinch/mode-fix
  > Merge pull request adafruit/Adafruit_CircuitPython_BNO055#25 from peterhinch/issues_23_24

Updating https://github.com/adafruit/Adafruit_CircuitPython_IRRemote to 3.3.2 from 3.3.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_IRRemote#23 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH to 4.3.5 from 4.3.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIS3DH#50 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.2.1 from 1.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#19 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90393 to 1.2.1 from 1.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90393#9 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPL3115A2 to 1.1.3 from 1.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPL3115A2#5 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPR121 to 2.0.2 from 2.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPR121#18 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.0.1 from 3.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#33 from ChewyTurtle/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_SI5351 to 1.1.3 from 1.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SI5351#5 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.6.3 from 2.6.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#25 from dherrada/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_AVRprog to 1.1.3 from 1.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_AVRprog#8 from dherrada/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants