Giter VIP home page Giter VIP logo

ads1x15's People

Contributors

robert-hh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ads1x15's Issues

modifications for current Raspbian Stretch (Debian Stretch) release and python module error

data = array("h", 0 for _ in range(_BUFFERSIZE)) <-error " generator has to be placed in parentheses if not the only argument."

data = array("h", (0 for _ in range(_BUFFERSIZE))) <- accepted

The 'machine' module was installed but is not detected. (sudo) pip install machine.
Installation process normal and concludes correctly, still, a "No module named machine" occurs.

Running Python 2.7 on Raspberri Pi Raspbian Stretch (Debian), current verison.
I leave the module file, 'ads1x15.py' in the same directory as the test script taken from github.
Should I have made some other preparation for using the module?

Parallel sampling

Hi Robert, I'm using your library with a Pycom Wipy 3.0 in order to catch data from 3 sensors.

Sensor1 must be read every 10ms, sensor2 and sensor3 every 100ms.
I'm using 4 as a rate (_DR_1600SPS, # 1600/128 samples per second) and the conversion time is more or less 10ms. When i reach 100ms I got a delay since every conversion time is accumulated for the 3 sensors. In fact, sensor1 is sampled every 11ms, but at the tenth sampling it loses 30ms. Sensor2 and 3 are sampled every 130ms. Could you suggest me a way to reduce this delay?

Thank you!

pin object has no attribute irq

I am testing your sample code for continuous sampling trigger by the ADC, however, there are a couple of things that are not clear. One of them is the irq attribute of Pin. Is the line

irq_pin.irq(trigger=Pin.IRQ_FALLING, handler=sample_auto)

supposed to work on ESP32 (i.e. LoPy4 + pysense)? In my case, it does not:

AttributeError: 'Pin' object has no attribute 'irq'

That said, I modified a few lines to instantiate the I2C bus, and I can manage to run your example using the callbackmethod in Pin. However, it does not seem to actually change the data rate of the ADC (I get around 34 sps, no matter the rate -- though I am executing this in REPL). You mentioned you reach 252 sps? Were you able to test different rates?

Help appreciated.

Is this library compatible with the ADS1114?

Hello, I'm trying to implement an transimpedance amplifier in a sensor circuit and the ADC I'll use is the ADS1114. By reading the registers page in the datasheet and by going through the hole python library, I don't know if this library may be compatible with this specific ADC. Could it be compatible or should I create a new library only for that ADC?

Sampling rate problem

Hi here is the function I used for sampling at 860s/s.
i2c = I2C(1,scl=Pin(15), sda=Pin(14), freq=400000) ads = ads1x15.ADS1115(i2c, addr, gain) def sample(adc = ads.read_rev, data=data, timestamp = timestamp, voltage=ads.raw_to_v): global index_put, irq_busy for i in range(860): if irq_busy: return irq_busy = True if index_put < _BUFFERSIZE: ads.set_conv(7, 0) data[index_put] = ads.read_rev() index_put += 1 i +=1 irq_busy = False irq_busy = False index_put = 0
Here is what I get with a 40Hz Sine:
Screenshot 2022-03-17 011346

I don't know if it is my ADC or a problem in my code!
Any response is greatly appriciated :)

ads1015

Hello,
for the ads1015 i have a problem with your driver. I had to delete the gain on this
ads = ads1x15.ADS1015(i2c, addr)
by adding the gain i have this issue
function takes 4 positional arguments but 5 were given

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.