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 mbed-rtos TextLCD
Diff: STEPPER_MOTOR.hpp
- Revision:
- 16:9f98ec0ededb
- Parent:
- 12:d9c133b360b0
--- a/STEPPER_MOTOR.hpp Mon Feb 11 20:43:39 2019 +0000 +++ b/STEPPER_MOTOR.hpp Mon Feb 11 22:03:47 2019 +0000 @@ -11,7 +11,6 @@ class STEPPER_MOTOR //This creates a class called Led { public: - STEPPER_MOTOR(PinName N1, PinName N2, PinName N3, PinName N4); //Constructor ~STEPPER_MOTOR(); //Destructor void Permanent_Rotate(); @@ -19,12 +18,14 @@ void Permanent_Rotate_anti_clock_wise(); void Rotate_90(); void Rotate_Steps(int Steps); + int Get_Steps_Done(); private: //Private member variables to prevent them being accessed externally //Data Pins bool _dir; int _step; int _Number_of_steps; + int _Steps_Done; DigitalOut pin1; //Pin 1 DigitalOut pin2; //Pin 2 DigitalOut pin3; //Pin 3