You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code below shows a little example to test the influence of the datarate. When I am in single mode and adjust the sampling rate, I get the following result.
8: ~50 SPS
16: ~90 SPS
64: ~160 SPS
128: ~200 SPS
When I use continuous mode and adjust the datarate, nothing changes at all.
Can somebody explain this? According to the datasheet of ADS1115 I expected that the datarate does not have an influence in single mode but in continuous. And why does the datarate does not fit to the actual SPS? Many Thanks!
import board
import busio
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
from adafruit_ads1x15.ads1x15 import Mode
import time
import datetime
i2c = busio.I2C(board.SCL, board.SDA)
# init ads instance
ads = ADS.ADS1115(i2c)
channel = AnalogIn(ads, ADS.P0, ADS.P1)
# ADC Configuration
ads.mode = Mode.SINGLE
ads.data_rate = 8
ts_old = datetime.datetime.now()
samples = 1000
for i in range(samples):
ts = datetime.datetime.now()
print(str(channel.voltage))
print(ts - ts_old)
ts_old = ts
The text was updated successfully, but these errors were encountered:
Thanks fro redirection to #27 . This explains more. In the beginning I have the understanding that if the data rate is low, internal averaging is performed. But this is wrong as far as I can see. Now I am just curious.
So in CONTINUOUS mode the values are read as quick as possible?
However I still do not understand why in SINGLE mode the data rate has an influence, because it is a single shot/read on demand.
I guess differential read is not possible in CONTINUOUS mode, because on reads from two pins which involve a pin change.
Hi,
the code below shows a little example to test the influence of the datarate. When I am in single mode and adjust the sampling rate, I get the following result.
When I use continuous mode and adjust the datarate, nothing changes at all.
Can somebody explain this? According to the datasheet of ADS1115 I expected that the datarate does not have an influence in single mode but in continuous. And why does the datarate does not fit to the actual SPS? Many Thanks!
The text was updated successfully, but these errors were encountered: