IcsClass  2.0.0
IcsSoftSerialClass.h
[詳解]
1 
14 #ifndef _ics_SoftSerial_Servo_h_
15 #define _ics_SoftSerial_Servo_h_
16 
17 //#include <Arduino.h>
18 #include <IcsBaseClass.h>
19 #include <KoCustamSoftSerial.h>
20 
21 
22 //IcsClassクラス///////////////////////////////////////////////////
30 {
31  //クラス内の型定義
32  public:
33 
34  //コンストラクタ、デストラクタ
35  public:
36  //コンストラクタ(construncor)
37 
39 
40  IcsSoftSerialClass(byte rxPin,byte txPin,byte enpin);
41  IcsSoftSerialClass(byte rxPin,byte txPin,byte enpin, long baudrate, int timeout);
42  IcsSoftSerialClass(KoCustamSoftSerial *koSoftSerial,byte enpin);
43  IcsSoftSerialClass(KoCustamSoftSerial *koSoftSerial,byte enpin, long baudrate, int timeout);
44 
45  //デストラクタ(destruntor)
47 
48  //変数
49  public:
50 
51 
52  protected:
53  KoCustamSoftSerial *icsSoftSerial;
54  byte g_enpin;
55  int g_timeout = 1000;
56  long g_baudrate = 115200;
57 
58  //関数
59  //通信初期化
60  public:
61  virtual bool begin();
62  virtual bool begin(long baudrate,int timeout);
63  virtual bool begin(KoCustamSoftSerial *serial,byte enpin,long baudrate,int timeout);
64 
65 
66  //イネーブルピンの処理
67  protected :
71  inline void enHigh(){digitalWrite(g_enpin, HIGH);}
75  inline void enLow(){digitalWrite(g_enpin, LOW);}
76 
77  //データ送受信
78  public:
79  virtual bool synchronize(byte *txBuf, byte txLen, byte *rxBuf, byte rxLen);
80 
81  //servo関連 //すべていっしょ
82  public:
83 
84 
85 };
86 
87 #endif
IcsSoftSerialClass()
コンストラクタ
Definition: IcsSoftSerialClass.cpp:19
int g_timeout
タイムアウトの設定を格納しておく変数
Definition: IcsSoftSerialClass.h:55
~IcsSoftSerialClass()
デストラクタ
Definition: IcsSoftSerialClass.cpp:94
近藤科学のKRSサーボをArduinoのSoftwareSerialからアクセスできるようにしたクラス
Definition: IcsSoftSerialClass.h:29
void enLow()
enPinに割り当てられているピンをLにする
Definition: IcsSoftSerialClass.h:75
long g_baudrate
通信速度の設定を格納しておく変数
Definition: IcsSoftSerialClass.h:56
ICS3.5/3.6 bace library header file
byte g_enpin
イネーブルピン(送受信を切り替える)のピン番号を格納しておく変数
Definition: IcsSoftSerialClass.h:54
void enHigh()
enPinに割り当てられているピンをHにする
Definition: IcsSoftSerialClass.h:71
virtual bool synchronize(byte *txBuf, byte txLen, byte *rxBuf, byte rxLen)
ICS通信の送受信
Definition: IcsSoftSerialClass.cpp:175
KoCustamSoftSerial * icsSoftSerial
arudinoのシリアル型のポインタを格納
Definition: IcsSoftSerialClass.h:53
近藤科学のICS 3.5/3.6 サーボモータをマイコン経由で動作させるための基クラス
Definition: IcsBaseClass.h:62
virtual bool begin()
通信の初期設定
Definition: IcsSoftSerialClass.cpp:108