Hey everyone so i am moving two servos with a potentiometer and everything is great no jitter except when i max out the potentiometer in one direction. So say i max out my potentiometer at 90 degrees which is fine for the servo, if i hold it there then it shakes. but if i hold it in the opposite direction and make it go to 0 degrees it doesn't shake. Any ideas on how to stop this? Heres my code. Very simple.
#include <Servo.h>
Servo servo1;
Servo servo2;
int Xin= A0; // X Input Pin
int Yin = A1; // Y Input Pin
int KEYin = 3; // Push Button
xVal = analogRead (Xin);
xVal = map(xVal, 0, 1023, 0, 90); // scale it to use it with the servo
yVal = analogRead (Yin);
yVal = map(yVal, 0, 1023, 0, 90); // scale it to use it with the servo
buttonVal = digitalRead (KEYin);
The output i get from the serial monitor says just 0. Doesn't change much at all very stable. It shakes when it is at 0, but it i move the pot the other way to 90 it is completely fine, no shaking and it is a stable 90. If its on a flat surface and i move it to 0 then it shakes as much as moving itself across the surface.