Program for driving unipolar stepper motor model RoHS 28BYJ-48 12 VDC. Motor can be driven in wave, full step, and half step modes in clockwise and anticlockwise directions.

Dependencies:   mbed

Revision:
6:2db0077aae0d
Parent:
5:f81d343c3d7a
--- a/main.cpp	Wed Jul 27 09:25:28 2016 +0000
+++ b/main.cpp	Tue Sep 20 09:25:50 2016 +0000
@@ -16,7 +16,7 @@
     Yellow = coil 3     Orange = coil 4
     Red = common
     
-    A L293D driver board is used to drive the stepper motor. 
+    A ULN2003 driver board is used to drive the stepper motor. 
     A Variable named mode is used to select the mode of operation of the stepper motor. 
     wave drive   mode = 0
     full step    mode = 1
@@ -304,7 +304,7 @@
     wait(DLY);  
 }
 
-void halfstep_clockwise(void)
+void halfstep_clockwise()
 {
     halfstep_clockwise();
     pc.printf("Motor in half step \n\r");
@@ -357,7 +357,7 @@
     wait(DLY);
 }
 
-void motor_idle(void)
+void motor_idle()
 {
     blue = 0;
     pink = 0;