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:
- dlweakley
- Date:
- 2016-11-18
- Revision:
- 22:c18f04d1dc49
- Parent:
- 8:2abfdbf5a3b8
- Child:
- 23:5238b046119b
File content as of revision 22:c18f04d1dc49:
#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_wait); void clockwise(); void anticlockwise(); void clockwise(int wait); void anticlockwise(int wait); void step_clockwise(int steps); void step_anticlockwise(int steps); void step_anticlockwise(int steps, int wait); void step_clockwise(int steps, int wait); void run (bool t); int wait; bool dir; private: DigitalOut M1PWM; DigitalOut M2PWM; DigitalOut M1DIR; DigitalOut M2DIR; DigitalOut D2; }; #endif