Some quick code I threw together to run a stepper motor
Originally, I intended to use the uart to adjust the speed, but I found that the stepper ran just fine at the fastest speed I planned to test, so that code is a bit useless.
More details about the stepper I used and what I found at http://www.mjblythe.com/hacks/2016/09/28byj-48-stepper-motor/
The libraries that I'm using were provided with the kit that I bought ( http://www.nerdkits.com/ - looks like they don't sell kits anymore), but the idea should be easy to adapt to other libraries.