Change the int to a byte, but otherwise yes:
volatile byte x = 0;
Does it print the correct values? Does the servo correctly move to the corresponding positions?
Change the int to a byte, but otherwise yes:
volatile byte x = 0;
Does it print the correct values? Does the servo correctly move to the corresponding positions?