I got a flow working great... buttons, blinky lights... GPIO... all good.
I added an ADS1115 analog to digital chip and you MUST connect the channels in a daisy-chain combination or it will fail Node Red so hard you will need to go to the directory and delete the file. (Lesson learned... backup...backup...backup.)
Anyway, I was always getting data for channel 3 (They go 0 to 3.) but never anything else, and I have a potentiometer connected to CHAN-0. I have a trigger once per second for testing, and I see all four channels updating... but only the last in the queue will ever make it to the event message. I reordered the layout in the flow to 3,2,1,0 and now I only ever see chan-0 in the event.
I thought, okay, perhaps it is just so fast that I cannot see it... so I installed some IF / THEN / ELSE filters in the JavaScript to look for the text A0-GND, A1-GND, A2-GND, and A3-GND, so if found, it returns the position in the string if not, it returns -1.
I then have it display either "Valid Data" or "No Data Found" in the matching text box.
And as I suspected... it ONLY finds data from the last position called.
Anyone know how to get past this? I mean... I could use only ONE input per chip... but that's limiting me to 3. If this can be done, then I have 12 which is plenty.
Anyone have an idea???
See attached. ~ JerryBACKUP 4-10-2020.json (34.8 KB)
Look at the output data on the ADC.