kondoSerialservo krs6003rhv
Dependents: quad_spider_nhk2019_04
Diff: SerialServo.cpp
- Revision:
- 3:490e970d2795
- Parent:
- 2:a1e245feb5a2
diff -r a1e245feb5a2 -r 490e970d2795 SerialServo.cpp --- a/SerialServo.cpp Sun Mar 17 11:24:38 2019 +0000 +++ b/SerialServo.cpp Wed May 01 03:47:13 2019 +0000 @@ -33,3 +33,13 @@ transmission();//送信 } +void SerialServo::speed(char id,int spe){ + int temp1 = SUB_SP_COMMND; + int temp2 = spe; + tx_data[0] = ICS_PARA_WRITE_COMMND | id; + tx_data[1] = (unsigned char)temp1; + tx_data[2] = (unsigned char)temp2; + transmission();//送信 +} + +