I'm developing an application where the user will inform both commands and they shall see the arduino registered and then sent to another hardware.
The problem is when I need to convert to mount the command to be sent, the initial value is being lost.
uint8_t data;
data = 0xFF & (uint8_t) comand1 + comand2;
char valor[] = { 0xAA, 0x05, data};
comand1 and comand2 receive values ??via Serial.read ().
How should I proceed to get the commands that are not changed?