// MicroBoard program // Turning a 5-leads unipolar stepper motor (common +ve) // The 4 coil leads are connected to outputs 1~4 of ULN2003, which are // controlled by Pins, 8~11, and the common lead is connected +6V #define DELAY 100 // speed delay parameter, smaller the number the faster the rotation main() { int i; for(i=8; i <= 11; i++) pinlow(i); // turn all OFF loop for(i=8; i <= 11; i++) { // repeatedly turn ON each coil in turn pinhigh(i); // switch ON delay(DELAY); pinlow(i); // switch OFF } }