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
Diff: KRS.h
- Revision:
- 0:7bf595a76895
- Child:
- 1:50d0eb774b0d
diff -r 000000000000 -r 7bf595a76895 KRS.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/KRS.h Sat Jul 02 03:12:15 2022 +0000 @@ -0,0 +1,19 @@ +#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 \ No newline at end of file