What happened to my ground pin? (SOLVED)

2 days ago I got an Arduino UNO and I got the hang of it pretty fast.
Yesterday I tried controlling a servo with a joystick, it worked pretty well so I decided to connect another servo to the Arduino and assigned it to the joystick's other axis. Then when I tried to take any input from a potentiometer or a joystick it got messed up and was stuck on max value.

Today I troubleshoot the problem and found that if I connect the joystick to the other ground pin it works fine. So I just wanted to ask if someone has any idea what happened to the ground pin so I can avoid that happening on the other one?

Two things.

(1) use a common ground.

(2) put a delay of approx 20ms (50ms is better) between measurements to allow the chip to reset between readings.

Hope this works.

If this doesn't work, put your code up here for comment (don't forget the code tags and also to mention what pin is connected where)



1 Like

to allow the chip to reset between readings.


Simple explanation as I didn't know the OPs setup or technical background.

See here for a better explanation:

As good as any...

edit: Aysha -> option (3)

Read the pin twice (I've had to three times occasionally) and discard all but the last reading - I've had to do this many times to get something reading accurately.

Thanks for the help! After all, the problem was with the cable connected to ground.