Simple code snippet to set up and drive a stepper via the STSPIN820.
Using the X-NUCLEO-IHM14A1 eval board with Arduino connectors and a bipolar stepper motor. Connection is simple: stepper to board (read the board description). STSPIN is a shoot and forget driver: turn on motor with your desired speeds, and run forever. No software clocking or bit-banging. Ideal for motor control applications with real precision.
Sketch defines stepper modes and pin connections. Setup pin-connect (and interrupt), initialises the motor driver. Motorloop() is self-explainable.