Skip to content
Felix D Rodriguez Perez edited this page Aug 4, 2023 · 3 revisions

Welcome to the ads1x15 wiki!

Share your example

Please add a little description and a link to your example:

Shared knowledge

Issue #3

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.

Solution:

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;

Question and solution by @alexander-thiesen Originally posted by @alexander-thiesen in https://github.com/felixdrp/ads1x15/issues/3#issuecomment-1650373590

Clone this wiki locally