Skip to main content
2 of 2
deleted 4 characters in body
dda
  • 1.6k
  • 1
  • 12
  • 18

How to convert byte *payload to String

I would like to convert a byte *payload to a String, because I want to compare the content of payload to another String.

void mqttCallbackHandler(char *topic, byte *payload, unsigned int length) {
  String payloadstr = ???
  ...
}
Dániel Kis
  • 175
  • 1
  • 3
  • 9