KRS ICSサーボモータ用ライブラリ

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers KRS.h Source File

KRS.h

00001 #ifndef MBED_KRS_H
00002 #define MBED_KRS_H
00003 
00004 #include "mbed.h"
00005 
00006 class KRS{
00007     public: 
00008     typedef enum ROTATE {
00009         F,
00010         R,
00011         COM
00012     } ROTATE;
00013     
00014     KRS(PinName tx,PinName rx);
00015     
00016     void KRS::WriteAddress(uint8_t address);
00017     
00018     void KRS::SetStretch(uint8_t address, uint8_t value);
00019     
00020     void KRS::SetSpeed(uint8_t address, uint8_t value);
00021     
00022     void KRS::SetCurrent(uint8_t address, ROTATE rotate, uint8_t value);
00023     
00024     void KRS::SetPosition(uint8_t address, uint16_t value);
00025     
00026     private:
00027     Serial _serial;
00028 };
00029 
00030 #endif