I tried searching codes for MCP2515 with Arduino, On Arduino Forums, Instructables, Electronics Hub, YouTube etc.

All of them were codes for a transmitter node and a receiver node. Sensors on one node and result on the other end.

Can we connect two Arduinos using MCP2515 and communicate TWO WAY?


I never used CAN bus myself, but what you could do is one of the following:

  • Letting the transmitter send a specific (short) message to the receiver. In case the receiver has something to transmit, it sends a specific reply back, so the transmitter can request the receiver to send the actual message to be sent. The disadvantage is that polling is needed.
  • If you want the receiver to be able to send its message as fast as possible, add a separate wire next to the CAN bus communication. If that line is LOW or HIGH (decide yourself), then the transmitter can 'immediately' send a message to have the receiver send its actual message.
  • 1
    Thanks! Tx Arduino runs only tx code, and Rx Arduino runs only rx code. So, it's not possible for Rx to transmit anything back. And, using CAN is for reducing no. of wires used, but that's a nice idea. Jun 24 '21 at 9:27
  • 1
    By your first point, I'll try to merge the tx & rx commands, and temporarily make TX Arduino receive data, and vice versa. Jun 24 '21 at 9:31
  • 1
    Let us know how you do!
    – Gil
    Jun 25 '21 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.