MCP3008 only allowing 2 analog values to stream at a time

I have an esp8266 connected to an MCP3008 which should allow for 8 analog channels to be used on the MCP3008. I can successfully run 2 channels and stream data through these channels on any of the 8 channels provided. My setup with this is ch0 and ch1 of MCP3008. When I try to add a channel, ch2, no data comes through to this channel but the other 2 work fine. I then try all the other channels and same result. I then tried putting nothing in ch0, and using ch1 and ch2 and sure enough data comes in fine now for ch1 and ch2, verifying that ch2 is working fine. I then try to add ch0, or any other channel, and none of those work, however the original channels still work fine. I have therefore determined that all channels work when 2 or less channels are being used. When I try to use more than 2 channels, the remainder of channels do not work but the original 2 do.

So, long story short, why is my MCP3008 only working when using 2 or less channels? Is there something I am missing?

Ensure u use the chip correctly.
Se page 19 - single-ended / differential

Thanks! I actually found my issue. It was completely code related and I didn't even post any code. Totally my fault. This was the issue.

analogRead(sensorChannel);

should have been..

adc.analogRead(sensorChannel);

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.