KRS ICSサーボモータ用ライブラリ
初期化 KRS name(tx,rx);
位置指定 void SetPosition(id, position); [position : 0 3500 ~ 11500]
速度設定 void SetSpeed(id, speed); [speed : 0 ~ 127]
ストレッチ設定 void SetStretch(id, stretch); [stretch : 0 ~ 127]
電流制限設定 void SetCurrent(id, rotate, value : 0 ~ 127); [rotate : KRS::F KRS::R KRS::COM, current : 0 ~ 64]
ID書き込み void WriteAddress(id);
id : 0x00 ~ 0x1F
KRS.h
- Committer:
- koki_konishi
- Date:
- 2022-07-02
- Revision:
- 0:7bf595a76895
- Child:
- 1:50d0eb774b0d
File content as of revision 0:7bf595a76895:
#ifndef MBED_KRS_H #define MBED_KRS_H #include "mbed.h" class KRS{ public: KRS(PinName tx,PinName rx); void KRS::SetPosition(uint8_t address, uint16_t value); private: uint8_t byteH, byteL; uint16_t ins; Serial _serial; }; #endif