Per ora non ho ancora cambiato joypad, il controller è direttamente su arduino, non uso shield, ho risolto così:
if (mapY != 68 && mapY != 4 && mapY != 116 && mapY != 100) {
if (mapY > 132) { // if the Y-Axis stick position is positive
motoreY.setSpeed(1000);
motoreY.setAcceleration(50);
motoreY.run();
//Serial.println("muovo Y avanti");
//Serial.println(stickY);
} else if (mapY < 123) { // if the Y-Axis stick position is negative
motoreY.setSpeed(-1000);
motoreY.setAcceleration(50);
motoreY.run();
//Serial.println("muovo Y indietro");
//Serial.println(stickY);
} /*else {
motoreY.stop();
}*/
}
per ora il risultato è fluido!