I have some device i need to connect with by ASCII Commands. i declared some chars array and each command state i assigning it with the request command and then sent it through UART.
Do i have another option to assign the array instead of do it as follows?(for example)
Buf[0]='M';
Buf[1]='O';
Buf[2]='D';
Buf[3]='E';
Buf[4]='L';
Buf[5]=' ';
.
.
.
what i thought is to declare char array for each command and each state i will copy the requested command array to the one will be sent to the UART.