3.
Defines of ETC values
3.1.
Description
4.
How to control ETC driver
4.1.
Example using LED
Control the LED of DTP10-L by using serial daemon program provided by Daincube.
-
Serial COM port open
-
Packet buffer create.
-
CRC create and fill in the packet buffer
-
Transmit serial packet
-
Serial COM port close
You can control LED of DTP10-L by transmit serial packet as below.
STX
MOD
SEL
DATA1
DATA2
DATA3
CRC_H
CRC_L
ETX
0x02
0x11
0x3A
0x63
0x33
0x20
0xXX
0xXX
0x03
1BYTE
1BYTE
1BYTE
1BYTE
1BYTE
1BYTE
1BYTE
1BYTE
1BYTE
MOD : MOD_GET = 0x10, MOD_SET = 0x11
SEL : SEL_LED = 0x3A
DATA1 : RIGHT_LED1 = 0x63, RIGHT_LED2 = 0x62, RIGHT_LED3 = 0x61
DATA2 : LED_OFF = 0x30, LED_BLUE = 0x31, LED_RED = 0x32, LED_ALL_ON = 0x33
DATA3 : DATA_RESERVED = 0x20
/*
* Function name : LED_Set
* Descripition : This function is control of LED and each led has its own value.
* If you control LED, using this function.
*/
void Serial_Daemon::LED_Set(char sel, char data)