I need to develop some kind of “gateway” between two different CAN subnets, so I can translate one signal from one subnet to the other:
CAN subnet “A” is 250kbps
CAN subnet “B” is 500kbps
My intention is to read signal “X” on CAN “A”, and transmit the data as signal “Y” on CAN “B”.
How can I do this with Arduino + CAN-BUS shield? Should I have two CAN-BUS shields attached to the same Arduino, and then read/transmit messages as described above?
Actually, you can do this with one Arduino and two CAN Bus shields. One of the shields will need to have the Select(CS) and Interrupt(Int) signals moved to other pins.
As for the code, I threw this together quickly, but it comes untested. There are drawbacks with the sketch and that version of the library. If you need more robust support for bridging, use the sub-development branch of the MCP_CAN_lib on my github. There is a tested dual CAN example already included in that library. github.com/coryjfowler/MCP_CAN_ … bridge.ino
Hello, i have a small question so i can finish my project my car has 3 different baudrate 33.3 , 95.0 and 500 for 2 shields yeah you use d9 and d10 but for the 3th i guess i have to do some modification on the board to use d8 ?