I using websockets for de NodeMCU in the next format:
void webSocketEvent(WStype_t type, uint8_t * payload, size_t lenght)
There is a mesage coming in with case:
case 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