Library for the CustomExplorerRobot.

Dependents:   CustomExplorerRobot_test

Committer:
Usuke
Date:
Sat Feb 27 09:20:21 2016 +0000
Revision:
0:ad4667fc5a76
??

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Usuke 0:ad4667fc5a76 1 #ifndef MBED_BD6212_H
Usuke 0:ad4667fc5a76 2 #define MBED_BD6212_H
Usuke 0:ad4667fc5a76 3
Usuke 0:ad4667fc5a76 4 #include "mbed.h"
Usuke 0:ad4667fc5a76 5 /** BD6212 control with direct PWM class
Usuke 0:ad4667fc5a76 6 */
Usuke 0:ad4667fc5a76 7 class BD6212{
Usuke 0:ad4667fc5a76 8 public:
Usuke 0:ad4667fc5a76 9
Usuke 0:ad4667fc5a76 10 BD6212(PinName fwd, PinName rev);
Usuke 0:ad4667fc5a76 11
Usuke 0:ad4667fc5a76 12 void speed(float speed);
Usuke 0:ad4667fc5a76 13
Usuke 0:ad4667fc5a76 14 void coast(void);
Usuke 0:ad4667fc5a76 15
Usuke 0:ad4667fc5a76 16 void operator= ( float value )
Usuke 0:ad4667fc5a76 17 {
Usuke 0:ad4667fc5a76 18 speed(value);
Usuke 0:ad4667fc5a76 19 }
Usuke 0:ad4667fc5a76 20
Usuke 0:ad4667fc5a76 21 protected:
Usuke 0:ad4667fc5a76 22 PwmOut _fwd;
Usuke 0:ad4667fc5a76 23 PwmOut _rev;
Usuke 0:ad4667fc5a76 24 float bspeed;
Usuke 0:ad4667fc5a76 25 };
Usuke 0:ad4667fc5a76 26
Usuke 0:ad4667fc5a76 27 #endif