I have a complex sketch with Arduino Uno, Bluetooth Serial Com using altSoftSerial, serial com using SoftwareSerial and Serial communication with PC.
I want to move one stepper motor and stop it when a signal is received. I use A4988 Pololu driver and NEMA 17 bipolar stepper motor.
This code is working fine. MyStepper.moveTo(position); MyStepper.runToPosition();
If I change the code to MyStepper.moveTo(position); MyStepper.run(); so that the running does not block my code the motor does nothing Absolutely no movement.
The ground of the motor power supply is connected with the ground of Arduino. The motor is working fine with blocking movements.
run()
function