So I am new to Arduino and digital design in general. I'm attempting to tackle some small simple projects over the summer to learn more about it.
The first one being a simple battleship game that takes two servos(controlled by a pot), led, and a switch. Essentially one person will set there servo to a position (drawn out so they know what that position is) and the other person will get a certain amount of tries to position theirs in the same place. when they press the switch if they are in the same position the led lights up.
the issue is that the servos jump around so I cant get them to stay in one position and I also cant get them to go to the same angle when I use the serial communication to read their positions I can never get them to the same spot.
I removed some jumper wires thinking maybe it was cross talk but they are still jumpy also I figured later on I would right a range in my code so that both servos can be a couple degrees of and it still be a hit seeing as how 180 degrees is a lot
attached is picture of circuit and code. thank you
battleshipard.ino (2.16 KB)