Great info here! I was able to get one working with an UNO and CAN shield with tom91's code for gen 2. It appears to all work without crashing except the sport mode does not engage. Below is a photo of the model for reference if anyone is looking for one:
I will try LRBen's code when I get a DUE. Note with the code above, you need to make the following changes as others noted that I missed initially (likely due to a newer library for mcp_can):
1) Add MCP_ANY in the setup loop:
while (CAN_OK != CAN0.begin(
MCP_ANY, CAN_500KBPS, MCP_16MHZ)) // init can bus : baudrate = 500k 8MHZ crystal
2) Add the following line at the end of the setup loop:
CAN0.setMode(MCP_NORMAL); // Change to normal mode to allow messages to be transmitted