Convert uint8_t [] to hex char []

(deleted)

see if sprintf() can format a complete string? you may need dtostrf() to format a float

Perfect, the sprintf worked out.
I first format the address byte by byte and then append it to the final String...

  char address[20];
  char buffer[3];
  for (i = 0; i < 8; i++) {
    sprintf(buffer, "%02x", sensor[i]);
    append(address, buffer);
  }

and

void append(char* s, char* buffer) {
  byte i;
  int bufferLen = strlen(buffer);
  int len = strlen(s);
  for (i = 0; i < bufferLen; i++) {
    s[len + i] = buffer[i];
  }
}

Thanks a lot,
Thomas

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.