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.
Diff: main.cpp.example
- Revision:
- 5:4afaa6b184e5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp.example Wed Aug 28 23:05:14 2019 +0200 @@ -0,0 +1,34 @@ +/* + sample program for AccelStepper.h + inspired by the Bounce example of the Arduino version + + +*/ +#include "AccelStepper.h" + +/** +*** Main function +**/ + +/*AccelStepper stepper(4, p21, p22, p23, p24); */ + +Timer t; +/* +int main() +{ + t.start(); + stepper.setMaxSpeed(200); + stepper.setAcceleration(50); + stepper.moveTo(500); + stepper.setMinPulseWidth(50); + + + + while (true) { + if (stepper.distanceToGo() == 0) + stepper.moveTo(-stepper.currentPosition()); + stepper.run(); + } +} +*/ +