demo demo
/
BluetoothSumo
Motor.h@0:41f85a3f645d, 2009-09-19 (annotated)
- Committer:
- demo
- Date:
- Sat Sep 19 18:32:13 2009 +0000
- Revision:
- 0:41f85a3f645d
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
demo | 0:41f85a3f645d | 1 | // H-Bridge Motor Control |
demo | 0:41f85a3f645d | 2 | // Copyright (c) 2009 sford |
demo | 0:41f85a3f645d | 3 | // Released under the MIT License: http://mbed.org/license/mit |
demo | 0:41f85a3f645d | 4 | |
demo | 0:41f85a3f645d | 5 | #ifndef MBED_MOTOR_H |
demo | 0:41f85a3f645d | 6 | #define MBED_MOTOR_H |
demo | 0:41f85a3f645d | 7 | |
demo | 0:41f85a3f645d | 8 | #include "mbed.h" |
demo | 0:41f85a3f645d | 9 | |
demo | 0:41f85a3f645d | 10 | class Motor { |
demo | 0:41f85a3f645d | 11 | public: |
demo | 0:41f85a3f645d | 12 | Motor(PinName pwm, PinName fwd, PinName rev); |
demo | 0:41f85a3f645d | 13 | void speed(float); |
demo | 0:41f85a3f645d | 14 | |
demo | 0:41f85a3f645d | 15 | protected: |
demo | 0:41f85a3f645d | 16 | PwmOut _pwm; |
demo | 0:41f85a3f645d | 17 | DigitalOut _fwd; |
demo | 0:41f85a3f645d | 18 | DigitalOut _rev; |
demo | 0:41f85a3f645d | 19 | }; |
demo | 0:41f85a3f645d | 20 | |
demo | 0:41f85a3f645d | 21 | #endif |