Comments (3)
Hi @rickwargo, yes two times dealy is necessary (in continuous mode. It is two times the conversion time. The reason is:
- You can read the ADS1115 at any time and you will always read the value from last conversion.
- When you change the channel while a conversion is ongoing, the conversion will be completed first.
The consequence of 2) is that in worst case you have to wait for conversion period. After that, you will have to wait for another conversion period until the first value from the new channel is available.
If you want to change channels quickly, the single shot method is much better.
I have to admit that it looks like copy-paste error or so and I should add a comment and/or put it the delay in a for-loop.
Thank you for raising this.
from ads1115_we.
Thank you for your quick response, @wollewald. That reasoning makes complete sense. Your library is very helpful as I am trying to squeeze the performance out of my two ADCs.
Perhaps there could be a override capability to not perform the delay and have the calling code be responsible for the correct delay. In a best worse-case scenario, at 860 SPS, it takes ~1,167 µSeconds to complete the conversion, twice that delay is only slightly more than the single delay of 2ms. And if code executed between the first conversion and the call to setCompareChannels, then just a little less time would be necessary.
Just a thought. Anyways, thank you again for your support of open source!
from ads1115_we.
Hi @rickwargo, maybe I add a "continuous non-blocking" mode. On the othe hand, there is a simple solution, which is the single-shot mode. Will think about this. Thanks!
from ads1115_we.
Related Issues (20)
- Ability to use result range HOT 44
- SPS is Low HOT 3
- Reduce code duplication HOT 3
- Hysteresis HOT 27
- Can you make an example on how to use the library in continous mode using more than one input? HOT 3
- ADS1115 - real 16 bit resolution? HOT 11
- Connecting another device change the voltage of the other device HOT 2
- Differential example HOT 5
- getResultWithRange(), can you please precise? HOT 2
- different gain settings by channel? HOT 7
- Why autorange blocks so much time when range is under 80% max? HOT 4
- Example with 2 I2C addresses HOT 1
- add license to library.properties HOT 2
- Using Wire1 with teensy 4.0 HOT 3
- Question: wrong read value HOT 9
- Use with ADS1015? HOT 9
- sometimes no value on random channel HOT 13
- Speed of 1015 HOT 9
- Differential result inverted? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ads1115_we.