This is a demo code for stepper motor
Dependencies: StepperMotorUni mbed
Revision 0:85fecbeec987, committed 2016-02-05
- Comitter:
- EduRemo
- Date:
- Fri Feb 05 07:37:59 2016 +0000
- Commit message:
- FRCRCE Stepper demo
Changed in this revision
diff -r 000000000000 -r 85fecbeec987 StepperMotorUni.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StepperMotorUni.lib Fri Feb 05 07:37:59 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/okano/code/StepperMotorUni/#93f9ce526f38
diff -r 000000000000 -r 85fecbeec987 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Feb 05 07:37:59 2016 +0000 @@ -0,0 +1,18 @@ +// "Hello" program for StepperMotorUni class library + + +#include "mbed.h" +#include "StepperMotorUni.h" + +StepperMotorUni motor( PTB0, PTB1, PTB2, PTB3); +int i; + +int main() +{ motor.set_pps( 200 ); + for ( i = 200; i<1000; i=i+100) + { + motor.move_steps(i); + wait( 5 ); + + } +}
diff -r 000000000000 -r 85fecbeec987 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Feb 05 07:37:59 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9296ab0bfc11 \ No newline at end of file