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: stepper.h
- Revision:
- 1:40e5ac1119a6
- Parent:
- 0:4e3ad938564e
- Child:
- 2:d9745be6c253
--- a/stepper.h Tue Jun 28 21:32:51 2022 +0000 +++ b/stepper.h Tue Jul 12 13:02:25 2022 -0400 @@ -4,8 +4,9 @@ class StepperMotor { public: - StepperMotor(PinName enable_pin, PinName step_pin, PinName dir_pin, - PinName ms1_pin, PinName ms2_pin, PinName ms3_pin); + StepperMotor(PinName enable_pin, PinName step_pin, PinName dir_pin, PinName ms1_pin, PinName ms2_pin, + PinName ms3_pin); + void step_positive(); void step_negative(); int32_t get_steps(); @@ -13,7 +14,7 @@ private: DigitalOut enable; - DigitalOut step; + PwmOut step; DigitalOut dir; DigitalOut ms1; DigitalOut ms2;