Steppers start rotating after homing when DMX signal not available
Posté : jeu. 19 janv. 2023 12:25
When I power on the Arspchuino32, the steppermotors start homing.
This is done in the setup, so the DMX signal isn't been read yet.
When the setup is finished and the board reads the DMX signal, the motors will travel to the position which is read (usually zero).
But when there is no DMX signal available, the motors also start rotating. They will only stop when the DMX signal becomes available.
Could it be that the motors are still seeing
So maybe after the while loop
The position and speed of the motors should be set to zero?
This is done in the setup, so the DMX signal isn't been read yet.
When the setup is finished and the board reads the DMX signal, the motors will travel to the position which is read (usually zero).
But when there is no DMX signal available, the motors also start rotating. They will only stop when the DMX signal becomes available.
Could it be that the motors are still seeing
Code : Tout sélectionner
m_stepper[i].refresh(255, 50);
Code : Tout sélectionner
while (digitalRead(zeroSwitch[i]))//as long as the limit switch is not pressed ((! zeroSwitch) reverses the behavior)
{
m_stepper[i].continuous();//turn !
delayMicroseconds(10);
}