Convert string plus hexadecimals to array of hex:
How can I parse this string in the arduino to get an array of hex values:


There are a few standard library (stdlib) functions that can help you with that. Below is a snippet:

char buf[] = "0x0F 0x2C 0x98 0xBD";
uint8_t val[4];

void setup()
{
  Serial.begin(9600);

  char* bp = buf;
  int i = 0;
  do {
    char* ep;
    val[i] = strtol(bp, &amp;ep, 16);
    Serial.println(val[i], HEX);
    bp = ep;
    i += 1;
  } while (*bp != 0);
}

void loop()
{
}


Cheers!