Implement it not as a function but as a C++ class. Each pin will need its own state variable. Look at the stepper libary to see how this is done, or read a book on C++
Implement it not as a function but as a C++ class. Each pin will need its own state variable. Look at the stepper libary to see how this is done, or read a book on C++