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
}