Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Ex_Stepper by
Revision 6:f86c43194362, committed 2018-07-17
- Comitter:
- glintligo
- Date:
- Tue Jul 17 01:12:41 2018 +0000
- Parent:
- 5:4219a5c6afc1
- Commit message:
- v1.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4219a5c6afc1 -r f86c43194362 main.cpp --- a/main.cpp Tue Jul 17 00:29:06 2018 +0000 +++ b/main.cpp Tue Jul 17 01:12:41 2018 +0000 @@ -2,12 +2,13 @@ #include "a4988.h" // en step dir -Stepper moter(PB_3, PA_6, PA_12); //实例化一个步进电机对象 +Stepper moter(PC_13, PB_0, PB_1); //实例化一个步进电机对象 int main() { moter.enable(); //启动步进电机 moter.step(1, 5000, 3200); // 1表示正转0表示反转 5000hz脉冲周期 转3200个脉冲 + wait(5); //等待5s moter.disable(); //关闭步进电机电机 while (1) {