PiPlanter 2 | Interfacing a Mikroelektronika CANSPI and an Arduino

The CANSPI board is a nice integration of the MCP2515 CAN Bus Controller and the MCP2551 CAN Bus Transceiver. To interface with these boards I’m using an Arduino Nano and the Seeed Studio CAN Bus Shield Library.

Here are some photos of the configuration, including the switch position on the CANSPI being used:

The wiring diagram goes as follows:

There are two parts of Arduino code, the sender and the receiver. The following code sends a sample piece of CAN data. Attach a potentiometer to A0, and twist it to see the differences in data in the receive code:

The following prints all CAN data received to the serial monitor:

Twist the potentiometer and see the change in data to see that it’s all working:

Thanks for reading!

2 Comments

  1. Hey,
    I am using Atmega2560. I am using P5,P6,P7(MOSI,MISO,SCK). I am also using seedstudio library for the newer can-shield version. My CS (D9), I have not connected INT to any pin. I have the same code. But it does not work for me. Does it matter, what pin selection I make?

Leave a Reply