takuya ichise / TI_TB6612FNG

Dependents:   TI_TB6612FNG_SAMPLE

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TI_TB6612FNG.h Source File

TI_TB6612FNG.h

00001 #ifndef MBED_TI_TB6612FNG_H
00002 #define MBED_TI_TB6612FNG_H
00003 
00004 #include "mbed.h"
00005 #include "Moter.h"
00006 
00007 class TI_TB6612FNG
00008 {
00009 public:
00010     TI_TB6612FNG(PinName pwma, PinName ain1, PinName ain2, PinName pwmb, PinName bin1, PinName bin2, PinName standby);
00011     void stop();
00012     void forward(float speed);
00013     void backward(float speed);
00014     void left(float speed);
00015     void right(float speed);
00016     bool isForward();
00017 
00018 private:
00019     Moter _motorL;
00020     Moter _motorR;
00021     DigitalOut _standby;
00022 
00023     bool _isForward;
00024 };
00025 
00026 #endif