collin80/esp32_can

getting started

Closed this issue · 3 comments

i am trying esp32_can/examples/CANTestESP32_BuiltIn/CANTestESP32_BuiltIn.ino with an esp32 and a transciever HVD230 plugged as such:

CAN transceiver ESP32
3V3 3V3
GND GND
CTX GPIO_5
CRX GPIO_4

i don't see any frames sent on the bus... any hint?

as a comparison i am able to see frames on the bus with the minimal example from https://github.com/sandeepmistry/arduino-CAN

Yes, I made my library fairly early and I'm not sure if anyone had standardized which pins to use for CAN back then... And well, I chose different pins than everyone else. This is the definition in esp32_can:
ESP32CAN attribute((weak)) CAN0(GPIO_NUM_16, GPIO_NUM_17) ;

As you can see, I used pins 16 and 17 instead of 4 and 5.

indeed... after changing this it works well. thanks!