//https://forum.arduino.cc/t/how-to-connect-two-half-bytes/1377477/23?
const char *hexIn = "8F C1 FF FF 5D";
const char del[] = " ";
char * endptr, * myPtr;
char hex2dec[10];
uint32_t dec = 0;
void nextHex() {
if (myPtr != NULL) {
dec = strtol(myPtr, &endptr, 16);
sprintf(hex2dec,"%s %d", myPtr, dec);
Serial.println(hex2dec);
myPtr = strtok(NULL, del);
}
}
void setup() {
Serial.begin(115200);
Serial.println("Hi");
myPtr = strtok(hexIn, del);
}
void loop() {
delay(1000);
nextHex();
}