Create a void function in Arduino that will be used for runStepperMotor. It must run for 5 revolutions and go back to its original position, but if the ultrasonic detects a presence, it should stop immediately reverse the stepper motor to its original position.
void runStepperMotor() { // run for 5 revolutions delay(5000); // stop immediately if ultrasonic detects a presence // reverse the stepper motor to its original position delay(5000); }