Initial Fork
TB6612.h
- Committer:
- Throwbot
- Date:
- 2014-10-05
- Revision:
- 4:53e02c276f23
- Parent:
- 2:73cbc6028f7a
File content as of revision 4:53e02c276f23:
/**
* Motor Driver TB6612 Control Library
*
* -- TB6612 is a device of the rohm.
*
* Copyright (C) 2012 Junichi Katsu (JKSOFT)
*/
#ifndef MBED_TB6612_H
#define MBED_TB6612_H
#include "mbed.h"
class TB6612 {
public:
float scale;
int _speed; //save control input
TB6612(PinName pwm, PinName fwd, PinName rev);
void speed(int speed);
void operator= ( int value )
{
speed(value);
}
int getSpeed();
protected:
PwmOut _pwm;
DigitalOut _fwd;
DigitalOut _rev;
};
#endif