This library is an attempt to encapsulate the Pololu motor board MC33926 Motor Driver Carrier.
http://www.pololu.com/catalog/product/1213
Dual MC33926 Motor Driver Carrier
This dual brushed DC motor driver, based on Freescale’s MC33926 full H-bridge, has a wide operating range of 5 – 28 V and can deliver almost 3 A continuously (5 A peak) to each of its two motor channels. The MC33926 works with 3 – 5 V logic levels, supports ultrasonic (up to 20 kHz) PWM, and features current feedback, under-voltage protection, over-current protection, and over-temperature protection.
Diff: Motor.h
- Revision:
- 0:b7c4b6de973e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor.h Mon Feb 11 19:49:50 2013 +0000 @@ -0,0 +1,27 @@ +#ifndef MBED_MOTOR_H +#define MBED_MOTOR_H + +#include "mbed.h" + +class Motor +{ +public: + + + Motor(PinName pwm, PinName dir1, PinName dir2); + + float speed(float speed, bool direction); + float speed(float speed); + Motor& operator= (float speed); + + +protected: + PwmOut _pwm; + DigitalOut _dir1; + DigitalOut _dir2; + bool _direction; + + +}; + +#endif