example for easyStepper
Dependencies: mbed easyStepper
main.cpp
- Committer:
- Dennis_Yu
- Date:
- 2018-09-07
- Revision:
- 0:ee86f47fc2f7
File content as of revision 0:ee86f47fc2f7:
#include "mbed.h" #include "stepper.h" DigitalOut myled(LED1); Stepper myStepper[2] = { {PC_5, PC_4, PD_2}, {PA_5, PA_4, PA_2}, }; int main() { while(1) { rotate(myStepper[0], 0.0002, 1000); rotate(myStepper[0], 0.0002, -1000); rotate(myStepper[1], 0.0002, 1000); rotate(myStepper[1], 0.0002, -1000); } }