Giter VIP home page Giter VIP logo

Comments (3)

wollewald avatar wollewald commented on May 23, 2024 1

Hi @rickwargo, yes two times dealy is necessary (in continuous mode. It is two times the conversion time. The reason is:

  1. You can read the ADS1115 at any time and you will always read the value from last conversion.
  2. 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.

rickwargo avatar rickwargo commented on May 23, 2024

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.

wollewald avatar wollewald commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.