AK-Homberger/NMEA2000WifiGateway-with-ESP32

ESP32_CAN Pins

ronzeiller opened this issue · 1 comments

Hi Andreas,
you are writing at ttlappalainen/NMEA2000#97 (comment) that

BTW: The AZDelivery ESP32 NODE MCU is using:

GPIO2 -> CAN TX
GPIO4 -> CAN RX

But I could not find those pin definitions in your code?

Thanks,
Ronnie

Hi Ronnie,

You are right. I changed the settinge in header file for the ESP 32 NMEA2000 library "NMEA2000_esp32.h":

#ifndef ESP32_CAN_TX_PIN
#define ESP32_CAN_TX_PIN GPIO_NUM_2
#endif
#ifndef ESP32_CAN_RX_PIN
#define ESP32_CAN_RX_PIN GPIO_NUM_4
#endif

It would be probably better to define it direcrtly in the main code to avoid confusion.

Regards,
Andreas