Hi, I am using an UNO board with Adafruits Motor control shield. I have two servos attached to the two servo sockets on the shield and 6 switches with pull up resistors attached to analog pins A0 - A5.
I have a weird problem And cannot work out why it is happening.
When I have a seperate power supply for the UNO and the motor shield (no jumper) (both 6volts) for some reason switches on pins A0 and A1 are very glitchy and don't seem to work properly. I get a reaction from the servo's but they do not seem to trigger the right switch/case in my program.
To clarify, this only happens when using he seperate supplies. I have tried the following:
UNO, powered via USB, using the jumper on the motor shield to share the power - No Problems
UNO, powered by adapter (6v) with a seperate adapter powering motor shield- Glitchy a1 a0 response, other pins work fine
Adapter straight into motor shield (with jumper), sharing power with UNO- No Problems
Adapter straight into UNO (with jumper) sharing power - Glitchy a1 a0 response, other pins work fine.
I am stumped as to why this is happening. I thought that seperate power for the shield/UNO was preferable but it seems to cause glitches.
I have also noticed that I get instant response from all the switches when using shared USB power, however with every other method I get pins A3 - 5 giving good response with a glitchy a0/a1.
Anyone any idea as to why this may be happening?. Have not posted code as It works absolutely fine on USB power and Single shield power so I know the code is ok.