Wiring a MKR CANBUS Shield to an Arduino Uno

A friend accidentally bought a MKR CANBUS Shield without knowing that a MKR was a different animal than the Uno. He gave it to me to play with. I figured out how to wire it up so it works OK with the mcp_can libraries.

Some of the mcp_can libraries and examples use pin 9 instead of 10. That was the only code I had to change to get the libraries and examples I found on the internet to work.

#include <stdlib.h>
#include "mcp_can.h"
#include <SPI.h>

MCP_CAN CAN0(10);   // Set CS to pin 9/10
                    // Use pin 10 for Seeed Studio CAN Shield up to version 1.0
                    // Use pin 10 for SK Pang CAN Shield
                    // Use pin 10 for DFRobot Can Shield 2.0
                    // Use pin 10 for MKR CanBus Shield wired to Pin 10 on Uno
                    // Use pin 9 for Seeed Studio CAN shield version 1.1 and higher

Also beware that the MKR Canbus Shield has an error on labeling the Can H and Can L on the BOTTOM of the board. They are reversed. They are correct on the top of the board (in micro letters).

Hope this shortens the learning curve for someone! I successfully got an Uno with a DFRobot Can Shield 2.0 sending sample Can messages back and forth to an Uno using the MKR Canbus Shield.

1 Like