-
Notifications
You must be signed in to change notification settings - Fork 1
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
Channel mismatch #3
Comments
Hello @alexander-thiesen,
|
Hello @felixdrp, Line 351 in 42644aa
The ADC chip was not finished with its measurements before your code read out the old value, which has not been changed yet. Adding another millisecond was sufficient in my case: const delay = (1000 / sps) + 2;
Alternatively, one could add a read request to read the config register. The first bit tells if a conversion is still running. I was thinking about adding a "safe" function that requests this value before read out. Greetings |
Hello @alexander-thiesen, Thank for your detail explanation. It sounds good 'to read the config register'. What about a mix where we have a smaller delay then 'read de register' and if it is not finish yet apply the delay again...? Many thanks |
Prevent #3 Increase delayFineTune to 2.
Updated version with delayFineTune option. |
Hello @felixdrp,
we have a problem with the communication to our ads1115 chip.
When we read out the chip using code similar to single-shot-example.js the channels get messed up.
We used the implementation of (https://github.com/meeki007/node-red-contrib-ads1x15_i2c).
That means that when we read out channel 2 and 3 the output of channel 2 has sometimes the value of channel 3, vice versa.
For easy demonstration purposes we set the input voltages of the ADC to 1, 2, 3, 4 V respectively.
We ask for the values every 200 ms. Input is single ended. Until now we used 128 Samples/sec.
Do you have a idea where the source of this problem might be and how to solve it?
Thank you in advance
Alexander Thiesen
A similar Issue has been reported under:
meeki007/node-red-contrib-ads1x15_i2c#6 (comment)
The text was updated successfully, but these errors were encountered: