having trouble with my servos.

Hey, I am making this project of a robotic arm for my desk, on my first test this happened, https://streamable.com/0hn6s The servo thrash around like mad, no matter what I do they still do that, and the last potentiometer only is ment to control the last joint yet it kinda moves all of them, Help.

#include <Servo.h>


Servo myservo1; 
Servo myservo2;
Servo myservo3;


int potpin1 = A1; 
int potpin2 = A2;
int potpin3 = A3;

int val1; 
int val2; 
int val3; 


void setup()
{
TIMSK0=0;
myservo1.attach(3); 
myservo2.attach(5);
myservo3.attach(6);
myservo1.write(90);
myservo2.write(90);
myservo3.write(90);
delayMicroseconds(100);

}
void loop() {
{ 
TIMSK0=0;
val1 = analogRead(potpin1); 
val1 = map(val1, 0, 1023, 0, 180); 
myservo1.write(val1); 
delayMicroseconds(15);


val2 = analogRead(potpin2); 
val2 = map(val2, 0, 1023, 0, 180); 
myservo2.write(val2); 
delayMicroseconds(15);


val3 = analogRead(potpin3); 
val3 = map(val3, 0, 102, 0, 180); 
myservo3.write(val3); 
delayMicroseconds(15);

} 
}

Why are you messing with the interrupt masking (TIMSK0=0)? Take those lines out and see what it does.

And what are those delayMicroseconds() for? Servos are mechanical devices and work on millisecond timescales at best. Sending a command than waiting 15 microseconds isn't going to do much.

Steve

Ok I just tried that, it did not help.
btw here is a schematic Tinkercad | From mind to design in minutes

@LMminemagician

The "Report to Moderator is NOT a REPLY button.
Strongly suggest you READ THIS

Bob.