Skip to content

Multiplatform Arduino library for supporting the native CAN controller on Due (SAM3X) and Teensy 3.1 (K2X) as well as MCP2515 through SPI

License

Notifications You must be signed in to change notification settings

OLFDB/CAN_Library

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Added support for Nordic Semiconductor SDK

Tested with SDK 15.3.0

Use

CFLAGS += -DARDUINO_ARCH_AVR CFLAGS += -DNORDIC_CAN

in your Makefile.

Added support for further clock frequencies. Settings taken from https://github.com/Mebus/CAN_BUS_Shield-1

List of available frequencies:

#define MCP_20MHZ 0 #define MCP_16MHZ 1 #define MCP_10MHZ 2 #define MCP_8MHZ 3 #define MCP_4MHZ 4

CAN_Library Build Status

This library supports the Controller Area Network (CAN bus or CAN) and 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:

Since I have taken features from so many libraries I can’t tell what came from where, so in order not to violate any GPL, LGPL or any other license out there I am trying to give credit where credit is due. I am only a contributor to this library and some of the work here might not be mine. I can take credit in putting it together and releasing back to the public to make any variation as needed.

To start using this library, simply add the following two lines to your sketch:

#include <CAN.h>
#include <SPI.h> // required to resolve #define conflicts

Acknowledgements:

About

Multiplatform Arduino library for supporting the native CAN controller on Due (SAM3X) and Teensy 3.1 (K2X) as well as MCP2515 through SPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 75.4%
  • C 24.6%