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.
Motor/Motor.h
- Committer:
- nolan21
- Date:
- 2016-11-18
- Revision:
- 23:5238b046119b
- Parent:
- 22:c18f04d1dc49
File content as of revision 23:5238b046119b:
#ifndef MBED_MOTOR_H #define MBED_MOTOR_H #include "mbed.h" class Motor { public: Motor(PinName _M1PWM, PinName _M2PWM, PinName _M1DIR, PinName _M2DIR, PinName _D2, int default_delay); void clockwise(); void anticlockwise(); void clockwise(int delay); void anticlockwise(int delay); void step_clockwise(int steps); void step_anticlockwise(int steps); void step_clockwise(int steps, int delay); void step_anticlockwise(int steps, int delay); void run (bool t); void run2 (bool t); void initialize (int middle); int delay; int length; bool dir; int steps; private: DigitalOut M1PWM; DigitalOut M2PWM; DigitalOut M1DIR; DigitalOut M2DIR; DigitalOut D2; }; #endif