
Unipolar Stepping motor drive sample program
Please refer my notebook.
http://mbed.org/users/kenjiArai/notebook/stepping-motor-control-unipolar-type/
I have tested the program following mbed boards.
- mbed ST Nucleo L152RE
- mbed ST Nucleo F401RE
- mbed LPC1114FN28
Revision 3:c5d6501ad6a4, committed 2014-08-24
- Comitter:
- kenjiArai
- Date:
- Sun Aug 24 00:13:31 2014 +0000
- Parent:
- 2:b9a28dff5ffb
- Commit message:
- small modification (change port)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b9a28dff5ffb -r c5d6501ad6a4 main.cpp --- a/main.cpp Sat Aug 23 08:49:00 2014 +0000 +++ b/main.cpp Sun Aug 24 00:13:31 2014 +0000 @@ -6,7 +6,7 @@ * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: July 12th, 2014 - * Revised: August 23rd, 2014 + * Revised: August 24th, 2014 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE @@ -31,7 +31,7 @@ // Object ---------------------------------------------------------------------------------------- #if defined(TARGET_LPC1114) Serial pc(dp16,dp15); // Communication with Host -STEPPER sm_r(dp1, dp2, dp4, dp5); +STEPPER sm_r(dp1, dp2, dp4, dp6); STEPPER sm_l(dp17,dp18,dp25,dp26); #elif defined(TARGET_NUCLEO_L152RE) || defined(TARGET_STM32F401RE) Serial pc(SERIAL_TX, SERIAL_RX); // Communication with Host