I try to connect an Can-Bus controller( SN65HVD230) to a ESP32(DOIT DEVKIT V1) but its not running.
I used the tutorial from here http://www.iotsharing.com/2017/09/how-to-use-arduino-esp32-can-interface.html
I get no answer from the sending ESP in the terminal like descripted in the tutorial.
Have anyone some experience with ESP32 with CANBUS?
I have also a MCP2515 wich i can use, but i have not found a solution to run this with the esp32.
additional here my response from the ESP32 in the terminal:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
mode:DIO, clock div:1
E (106) spiram: SPI RAM enabled but initialization failed. Bailing out.
iotsharing.com CAN demo
This an OpenHAB forum. Maybe some has experience to share.
Have you tried the ESP forums or the arduino forums?
So, i found the solution. My ESP32 works woth an MCP2515.
Now i have the next problem.
How can i transfer a array of 3 HEX strings to a time in Format hh:mm:ss ?
Here the code from the arduino sketch for the array
datatype of the array:
unsigned char rxBuf;
rxBuf -> HEX-string of hours for example 0x9 -> 9 hour
rxBuf -> HEX-string of minutes for example 0x23 -> 23 minutes
rxBuf -> HEX-string of seconds for example 0x56 -> 56 seconds
But if the hours, minutes and seconads < 10 then its only as 1 char sendet(for example see hour “0x9”).
Have anyone expirience with C++ and can help me?
Continuing the discussion from ESP32 + CAN-BUS help needed:
Hi, can you tell me what’s the solution of your first question? You told you have solved it… thank you
Looking at this topic - can you outline basic frame structures you have? I did work on generic purpose CAN driver () and binding last year (). Point where I stopped was mapping of received data.
I know very little of CAN protocols other than CANopen so my work was going into direction of mapping frame id and individual payload parts, without any support for filtering or matching of payloads themselves.
Can you describe at least several frames you have?