I am using an Arduino UNO with the Adafruit Motor Shield v2.3 to run a stepper motor (12V Power supply with jumper) - it runs perfectly fine.
Also, the circuit of the CNY70 works perfectly fine, as long as I connect it straight to the Arduino (using A0 as the input pin).
Now, if I connect the motor shield to the Arduino and run the CNY70 via A0, I only receive "0" as inputs.
How do you connect to the A0 pin if the shield is applied? The pins are not passed up.
A4 and A5 are internally (on the UNO board) connected to SDA and SCL, so these are not available as analog inputs if you use any I2C device like the motor shield.
please find some photos from the circuits here:
Next time please post the pictures to the forum and not an external site. Two reasons: it’s much more complicated to get to the pictures for every reader and after a few months they simply disappear and a later reader cannot see what we saw when we answered.
I cannot find any hint on the pictures why the analog input should not work. Having the wire with the analog signal near the motor isn’t good for the signal quality but it doesn’t remove the complete signal.
Please post your code (and use code tags! That’s the </> button in the editor), maybe we find something there.