![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Schrittmotor (unipolar) Beispiel.
Dependencies: StepperMotorUni mbed
Fork of StepperMotorUni_Hello by
Revision 1:1330fe477c67, committed 2015-01-03
- Comitter:
- marcel1691
- Date:
- Sat Jan 03 14:31:09 2015 +0000
- Parent:
- 0:ae2206213141
- Commit message:
- Schrittmotor (unipolar) Beispiel.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jan 19 11:01:48 2014 +0000 +++ b/main.cpp Sat Jan 03 14:31:09 2015 +0000 @@ -1,26 +1,26 @@ -/** "Hello" program for StepperMotorUni class library +/** + * Schrittmotor (unipolar) Beispiel. + * @see http://developer.mbed.org/components/Stepper-motor-unipolar/ * - * very simple sample of "StepperMotorUni" operation - * - * version 1.0 - * copyright: 2014 Tedd OKANO - * released under the Apache 2 license License + * Die verwendeten Pins spielen keine Rolle. */ #include "mbed.h" #include "StepperMotorUni.h" -StepperMotorUni motor( p26, p25, p24, p23 ); +StepperMotorUni motor( D4, D5, D6, D7 ); int main() { - motor.set_pps( 50 ); + // Motordrehzahl + motor.set_pps( 300 ); - while ( 1 ) { - motor.move_steps( 24 ); - wait( 1 ); + while ( 1 ) + { + motor.move_steps( 2000 ); + wait( 8 ); - motor.move_steps( -24 ); - wait( 1 ); + motor.move_steps( -2000 ); + wait( 8 ); } }
--- a/mbed.bld Sun Jan 19 11:01:48 2014 +0000 +++ b/mbed.bld Sat Jan 03 14:31:09 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file