Library that controls BD6211F of rohm.
Dependents: WallBot_Simple WallbotTypeN
Diff: BD6211F.h
- Revision:
- 0:e27bf165308f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BD6211F.h Wed Apr 27 02:51:14 2011 +0000 @@ -0,0 +1,34 @@ +/** + * Motor Driver BD6211F Control Library + * + * -- BD6211F is a device of the rohm. + * + * Copyright (C) 2011 Junichi Katsu (JKSOFT) + */ + +#ifndef MBED_BD6211F_H +#define MBED_BD6211F_H + +#include "mbed.h" + +class BD6211F { +public: + BD6211F(PinName fwd, PinName rev); + void speed(float speed); + void move(float speed , float time); + void operator= ( float value ) + { + speed(value); + } + +protected: + PwmOut _fwd; + PwmOut _rev; + Timeout timer; + float bspeed; + bool timer_flag; + void timeout(); + +}; + +#endif