takuya ichise / AF_TB6612FNG
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AF_TB6612FNG.h Source File

AF_TB6612FNG.h

00001 #ifndef MBED_AF_TB6612FNG_H
00002 #define MBED_AF_TB6612FNG_H
00003 
00004 #include "mbed.h"
00005 #include "Moter.h"
00006 
00007 class AF_TB6612FNG
00008 {
00009 public:
00010     AF_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