Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By canedje
#58877 Hello.
I using websockets for de NodeMCU in the next format:
Code: Select allvoid webSocketEvent(WStype_t type, uint8_t * payload, size_t lenght)

There is a mesage coming in with case:
Code: Select allcase WStype_TEXT: {
           USE_SERIAL.printf("[WSc] get text: %s\n", payload);
  }

Now I want to test payload with a string by :
if ( payload == string)
This gives errors because I try to compare a string to uint8_t pointer.
How to convert the string to uint8_t or visa versa to be able to compare?

Thanks in advance