Working with AccelStepper

tsenneville:
As I am new to this can you show me an example of how to do this by modifing my code?

That would be a huge job - a complete rewrite.

If you want someone to write a program for you please ask in the Gigs and Collaborations section of the Forum and be prepared to pay.

If you want to learn how to do it yourself start by studying some of the examples that come with the AccelStepper library.

...R
Stepper Motor Basics
Simple Stepper Code
Serial Input Basics - simple reliable ways to receive data.
Planning and Implementing a Program