NMEA2000_esp32 icon indicating copy to clipboard operation
NMEA2000_esp32 copied to clipboard

Conflicting Declaration with tNMEA2000_esp32 NMEA2000;

Open atestani opened this issue 8 months ago • 6 comments

I am porting a Teensy3.2 NMEA2000 application to ESP32. I'm using PlatformIO and an ESP32-WROOM-32E.

platformio.ini is:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = 
	ttlappalainen/NMEA2000-library@^4.21.5
	ttlappalainen/NMEA2000_esp32@^1.0.3
....

The start of the code looks like this:

// Set up your NMEA2000 CAN pins
#define ESP32_CAN_RX_PIN GPIO_NUM_7
#define ESP32_CAN_TX_PIN GPIO_NUM_4

#include <Arduino.h>
#include <NMEA2000_CAN.h>  // This will automatically include NMEA2000 library
#include <NMEA2000_esp32.h>  
...

// Create NMEA2000 instance
tNMEA2000_esp32 NMEA2000;

The last line is giving a conflicting declaration error. I have searched throughout the code several times and cannot find why this is happening. Also, I have been unable to find a documented example for use of these libraries on an ESP32. Any advice?

Thanks


atestani avatar Jun 06 '24 23:06 atestani