Right now all I gout out from the serial monitor is
0
0
I'd expect 4095
I've tried connecting +5V to the Channel 1 and 2 inputs but there's no effect. Has anyone had similar issues? Is there a better way to test whether the chip is working as intended?
Eventually I'd like to use pseudo-differential input but for now i'm sticking to the single ended setup used in the example until I figure out what's wrong.
Got it working. I was using an Arduino compatible board with a bluetooth module that connects over SPI. It seems there's some compatibility issue here because it works fine on my actual Arduino Uno.
If you use more than one SPI device there are several issues you must address:
a) separate chip select pin is needed for each device and they must all be set HIGH initially in setup().
b) if any of the SPI setup parameters differ between devices you have to check and reprogram the SPI hardware on every use
in case the other device used it last.
c) if using SPI from an interrupt service routine you have to disable interrupts around all calls to SPI code in the main code.