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

Files at this revision

API Documentation at this revision

Comitter:
nmoorthy2001
Date:
Tue Sep 20 09:25:50 2016 +0000
Parent:
5:f81d343c3d7a
Commit message:
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.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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;