79 static const float ANGLE_F_FALSE = 9999.9;
80 static const int ANGLE_I_FALSE = 0x7FFF;
83 static const int MAX_127 = 127;
85 static const int MAX_63 = 63;
87 static const int MIN_1 = 1;
90 static const float MAX_DEG = 180.0;
93 static const float MIN_DEG = -180.0;
96 static const int MAX_100DEG = 18000;
99 static const int MIN_100DEG = -18000;
111 IcsClass(HardwareSerial* icsSerial,
int enpin);
112 IcsClass(HardwareSerial* icsSerial,
int enpin,
long baudrate,
int timeout);
121 HardwareSerial *icsSerial;
130 bool begin(
long baudrate,
int timeout);
131 bool begin(HardwareSerial *serial,
int enpin,
long baudrate,
int timeout);
135 inline void enHigh();
140 bool synchronize(byte *txBuf, byte txLen, byte *rxBuf, byte rxLen);
146 int setPos(byte
id,
unsigned int pos);
150 int setStrc(byte
id,
unsigned int strc);
151 int setSpd(byte
id,
unsigned int spd);
152 int setCur(byte
id,
unsigned int curlim);
153 int setTmp(byte
id,
unsigned int tmplim);
166 bool maxMin(
int maxPos,
int minPos,
int val);
171 static int degPos(
float deg);
173 static float posDeg(
int pos);
□
Definition: IcsClass.h:43
シフト3 右手前
Definition: IcsClass.h:47
int setStrc(byte id, unsigned int strc)
サーボモータのストレッチ(保持力)の値を書き込みます
Definition: IcsClass.cpp:390
static const int MIN_ID
サーボIDの最小値
Definition: IcsClass.h:66
unsigned short getKrrButton()
KRRが受信しているボタンのデータを取得します
Definition: IcsClass.cpp:742
○
Definition: IcsClass.h:42
int getSpd(byte id)
サーボモータのスピード(出力)を読み込みます
Definition: IcsClass.cpp:596
static int degPos(float deg)
角度データ(float型)をポジションデータに変換
Definition: IcsClass.cpp:221
何も押されていない
Definition: IcsClass.h:31
シフト1 左手前
Definition: IcsClass.h:45
static const int MAX_ID
サーボIDの最大値
Definition: IcsClass.h:65
int getStrc(byte id)
サーボモータのストレッチ(保持力)の値を読み込みます
Definition: IcsClass.cpp:557
△
Definition: IcsClass.h:40
int getTmp(byte id)
サーボモータの現在の温度値を読み込みます
Definition: IcsClass.cpp:671
bool synchronize(byte *txBuf, byte txLen, byte *rxBuf, byte rxLen)
ICS通信の送受信
Definition: IcsClass.cpp:144
シフト2 左奥
Definition: IcsClass.h:46
int setTmp(byte id, unsigned int tmplim)
サーボモータの温度リミット(温度制限)値を変更します
Definition: IcsClass.cpp:513
bool getKrrAllData(unsigned short *button, int adData[4])
KRRが受信しているボタンデータおよびアナログポート(PA)のデータをすべて取得します
Definition: IcsClass.cpp:820
↓
Definition: IcsClass.h:35
KRR_BUTTON
KRRが受信するボタンデータの定義
Definition: IcsClass.h:29
近藤科学のKRSサーボをマイコン経由で動作させるのを1パッケージにまとめたクラス
Definition: IcsClass.h:60
×
Definition: IcsClass.h:41
int setCur(byte id, unsigned int curlim)
サーボモータの電流リミット(電流制限)値を変更します
Definition: IcsClass.cpp:471
static const int ICS_FALSE
ICS通信等々で失敗したときの値
Definition: IcsClass.h:74
エラー値(受信失敗等)
Definition: IcsClass.h:50
IcsClass(HardwareSerial *icsSerial, int enpin)
コンストラクタ
Definition: IcsClass.cpp:19
static const int MIN_POS
サーボのポジション最小値
Definition: IcsClass.h:72
int getCur(byte id)
サーボモータの現在の電流値を読み込みます
Definition: IcsClass.cpp:633
シフト4 右奥
Definition: IcsClass.h:48
bool begin()
通信の初期設定
Definition: IcsClass.cpp:64
static float posDeg(int pos)
ポジションデータを角度データ(float型)に変換
Definition: IcsClass.cpp:243
static const int MAX_POS
サーボのポジション最大値
Definition: IcsClass.h:70
static int degPos100(int deg)
角度データx100(int型)をポジションデータに変換
Definition: IcsClass.cpp:266
int getKrrAnalog(int paCh)
KRRが受信している指定したアナログポート(PA)のデータを取得します
Definition: IcsClass.cpp:779
int setSpd(byte id, unsigned int spd)
サーボモータのスピード(出力)を変更します
Definition: IcsClass.cpp:430
static int posDeg100(int pos)
ポジションデータを角度データ(int型)に変換
Definition: IcsClass.cpp:288
int setFree(byte id)
サーボモータをフリー(脱力)状態にします
Definition: IcsClass.cpp:349
int getPos(byte id)
サーボモータの現在のポジションデータを読み込みます
Definition: IcsClass.cpp:707
~IcsClass()
デストラクタ
Definition: IcsClass.cpp:47
↑
Definition: IcsClass.h:34
←
Definition: IcsClass.h:37
→
Definition: IcsClass.h:36
int setPos(byte id, unsigned int pos)
サーボモータの角度を変更します
Definition: IcsClass.cpp:312