This library is an attempt to encapsulate the Pololu motor board.

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