Open LolloMazzy opened 5 years ago
Why my stepper motor doesn't move with the instruction Mb.run() every loop, instead with this delay it can?
void loop() { if ((millis() - updateMB) >= 50) { Mb.Run(); // funzione per update dati da/a ModBus updateMB = millis(); } stepper.setSpeed(vel); stepper.runSpeed(); }
void loop() {
if ((millis() - updateMB) >= 50) {
Mb.Run(); // funzione per update dati da/a ModBus
updateMB = millis();
}
stepper.setSpeed(vel);
stepper.runSpeed();
Why my stepper motor doesn't move with the instruction Mb.run() every loop, instead with this delay it can?
void loop() {
if ((millis() - updateMB) >= 50) {
Mb.Run(); // funzione per update dati da/a ModBus
updateMB = millis();
}
stepper.setSpeed(vel);
stepper.runSpeed();
}