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.
Dependencies: mbed
Stepper.h@0:a1d256e2cd41, 2015-05-21 (annotated)
- Committer:
- thmaure
- Date:
- Thu May 21 14:21:25 2015 +0000
- Revision:
- 0:a1d256e2cd41
moteur pas ? pas
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thmaure | 0:a1d256e2cd41 | 1 | #ifndef MBED_STEPPER_H |
thmaure | 0:a1d256e2cd41 | 2 | #define MBED_STEPPER_H |
thmaure | 0:a1d256e2cd41 | 3 | #endif |
thmaure | 0:a1d256e2cd41 | 4 | |
thmaure | 0:a1d256e2cd41 | 5 | #include "mbed.h" |
thmaure | 0:a1d256e2cd41 | 6 | |
thmaure | 0:a1d256e2cd41 | 7 | class stepper |
thmaure | 0:a1d256e2cd41 | 8 | { |
thmaure | 0:a1d256e2cd41 | 9 | public: |
thmaure | 0:a1d256e2cd41 | 10 | stepper(PinName _en, PinName ms1, PinName ms2, PinName ms3, PinName _stepPin, PinName dir); |
thmaure | 0:a1d256e2cd41 | 11 | void step(int microstep, int dir, float speed); |
thmaure | 0:a1d256e2cd41 | 12 | void enable(); |
thmaure | 0:a1d256e2cd41 | 13 | void disable(); |
thmaure | 0:a1d256e2cd41 | 14 | private: |
thmaure | 0:a1d256e2cd41 | 15 | DigitalOut en; |
thmaure | 0:a1d256e2cd41 | 16 | BusOut microstepping; |
thmaure | 0:a1d256e2cd41 | 17 | DigitalOut stepPin; |
thmaure | 0:a1d256e2cd41 | 18 | DigitalOut direction; |
thmaure | 0:a1d256e2cd41 | 19 | }; |