demo demo
/
BluetoothSumo
Diff: Motor.h
- Revision:
- 0:41f85a3f645d
diff -r 000000000000 -r 41f85a3f645d Motor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor.h Sat Sep 19 18:32:13 2009 +0000 @@ -0,0 +1,21 @@ +// H-Bridge Motor Control +// Copyright (c) 2009 sford +// Released under the MIT License: http://mbed.org/license/mit + +#ifndef MBED_MOTOR_H +#define MBED_MOTOR_H + +#include "mbed.h" + +class Motor { +public: + Motor(PinName pwm, PinName fwd, PinName rev); + void speed(float); + +protected: + PwmOut _pwm; + DigitalOut _fwd; + DigitalOut _rev; +}; + +#endif