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.
Motor.h
- Committer:
- buckeyes1997
- Date:
- 2013-02-11
- Revision:
- 1:69e4a93b718d
- Parent:
- 0:b7c4b6de973e
File content as of revision 1:69e4a93b718d:
#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