Arduino IDE Espnow library won't compile for ESP32 Pico D4

Byteman-34
Posts: 1
Joined: Thu Feb 22, 2024 10:05 pm

Arduino IDE Espnow library won't compile for ESP32 Pico D4

Postby Byteman-34 » Thu Feb 22, 2024 10:16 pm

Frustrating issue, have been using Espressif espnow successfully with Generic ESP8266 dev boards. When trying to verify/compile for a ESP32 (Pico-D4 board) the compiler flags espnow.h as a file not found, tried other ESP32 boards - same issue.

Switching back to the ESP8266 board and all is good. I've closed and re-started the IDE, reinstalled the library, reinstalled the boards, etc. I even pulled out an old Win10 laptop - loaded the latest Arduino IDE, espnow library and boards - same compiling issue with the ESP32. Pretty stumped here!

Details:

Arduino IDE 2.3.2 2/20/24 update
Boards Mgr
- Esp8266 by ESP8266 ver 3.1.2 installed
- Esp32 by Espressif ver 2.0.14 installed (tried using older versions, no luck)
Boards selected:
- Generic ESP8266 Module
- ESP32 Pico-D4

ESP32 compiling error: compilation terminated. exit status 1
Compilation error: espnow.h: No such file or directory

TEST CODE:

Code: Select all

// ESP32 TEST TO GET ESPNOW.H TO BE RECONGIZED BY THE ARDUINO IDE COMPILER

#include <espnow.h>

uint8_t senderMac[] = { };               //NOT NEEDED

void setup() {
  Serial.begin(9600);

  esp_now_init();
  esp_now_set_self_role(ESP_NOW_ROLE_SLAVE);
  esp_now_register_recv_cb(onDataReceived);
}

void onDataReceived(uint8_t *senderMac, uint8_t *data, uint8_t len) 
{
  Serial.print("DATA RECEIVED: ");
  
}

void loop() 
{
  // Nothing to do here
}


Who is online

Users browsing this forum: No registered users and 98 guests