Go Down

Topic: Unified CAN Library (Read 3681 times) previous topic - next topic


I've written up a cross platform CAN library that builds on some of the excellent work out there done on individual CAN controllers. This library allows you to communicate with multiple types of CAN controllers using a consistent API, making CAN communications across development platforms easier through Arduino.

The idea behind this CAN library is to use a similar approach to Adafruit's Unified Sensor library by standardizing CAN function calls, frame structure, filters, masks, buffers, etc to be used with a wide variety of CAN controllers. This library currently supports the following controllers:

The library is available at https://github.com/McNeight/CAN_Library. If you use it, feel free to drop me a line.



I gave it a try, but I got "Your CPU & CAN controller are currently unsupported.". I have an MCP2515 connected to the SPI bus. Perhaps it did not see it. I can understand if it didn't recognize the CPU as it is embedded in an ESP8266. :)


FYI: Also, I got this message using Arduino 1.6.5: WARNING: Category '"Communication"' in library CAN_Library is not valid. Setting to 'Uncategorized'


So I tried this library with two Due's and the attached MCP2515 board

I first tested all these 2515 CANBUS boards with UNO's and the special 8 Mhz mcp2515 canbus library here:


which worked fine once I had my wiring straightened out.

I'm using the same canbus board (running at 3.3v) and cant seemt o get them to communicate.  The datasheet for the mcp2515 and the attached transceiver says both can wrok at either 5v or 3.3v.

Now posting this, I'm wondering if it is the 8mhz crystal; that is causing the issue ?

be nice to get these cheap canbus boards working with the dues - and yes I know the due has canbus but it requires wiring up can transceivers and what's the point ?  Much easier and more robust just to use an external board.

Worst case, I offload all the canbus stuff to unos but be nice to get the due's to work with this setup.

Anyone pulled this off ?


KOCHEVNIK the TJA1050 on the Niren MCP2515 CAM module uses 5V VCC. (4.75V min)

Neil has the unified library been updated to include the 8Mhz Niren MCP2515 board?


@Kochevnik did you managed to upload the examples files to the due?

I'm trying to use the niren mcp2515 can module with a due and I didn't found a suitable library to do so.

Does anyone has an idea?


I have the same problem, it's impossible even to compile with the due and an external MCP2515. Didanybody find a solution? or an appropriate library?

Thank you very much in advance.

Go Up