Yusuke Aihara / CustomExplorerRobot

Dependents:   CustomExplorerRobot_test

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers BD6212.h Source File

BD6212.h

00001 #ifndef MBED_BD6212_H
00002 #define MBED_BD6212_H
00003 
00004 #include "mbed.h"
00005 /** BD6212 control with direct PWM class
00006  */
00007 class BD6212{
00008     public:
00009     
00010     BD6212(PinName fwd, PinName rev);
00011     
00012     void speed(float speed);
00013     
00014     void coast(void);
00015     
00016     void operator= ( float value )
00017     {
00018         speed(value);
00019     }
00020     
00021     protected:
00022     PwmOut _fwd;
00023     PwmOut _rev;
00024     float bspeed;
00025 };
00026 
00027 #endif