Esp_now problem

You should post the error messages as code, because sometimes they have symbols that end up formatting your message, like asterisks making things italic:
(char *) abc, char* xyz
becomes
(char ) abc, char xyz

From the full compiler error, you are using (wrapped for clarity)

packages
\esp32\tools\esp32-arduino-libs\
idf-release_v5.1-3662303f31
/esp32/include/esp_wifi/include/esp_now.h

You are using version 5 of ESP-IDF, where esp_now_recv_cb_t expects a esp_now_recv_info_t as the first argument. However, the latest release version of Arduino-ESP32 still uses version 4, where the first argument is const uint8_t * as the MAC address, just like you have it in your code, and what the tutorial is targeting.

The packages are related to your Board. So you can try updating your code to match v5, or pick a different board that is still compatible but uses the v4 API. Or maybe an earlier version of the same board.

1 Like