Skip to content

ESP‑NOW — read received message (esp_now_new_data)

What it does: Retrieves one incoming ESP‑NOW message from the queue and returns it as text.

esp_now_new_data

Inputs

  • No data inputs.

Output

  • Message text; returns empty string "" on error or no data.

When to use it

  • After verifying the availability of data with block esp_now_data_check.
  • For reading commands, statuses or short text data.

Tips and pitfalls

  • The function removes null bytes at the end of the message and decodes UTF‑8.
  • If you are sending binary data, custom decoding may be better.

Generated Python example

message = esp_now_read_msg()