This repository provides an Arduino library for interfacing with the MCP2515 CAN controller, enabling CAN-BUS communication for Arduino projects. It supports standard and extended frames, along with sending, receiving, and
Here's a summary of the provided README, maintaining the original structure and technical details:
Arduino MCP2515 CAN Interface Library
This library enables Arduino boards to communicate over the CAN-BUS protocol, commonly used in industrial and automotive applications. It supports CAN V2.0B at up to 1 Mb/s, standard (11-bit) and extended (29-bit) frames, and offers two prioritized receive buffers.
Hardware:
The library is compatible with CAN-BUS Shields and DIY setups using components like the MCP2515 CAN controller and MCP2551/MCP2562 CAN transceivers.
Software Usage:
Installation involves downloading the library ZIP file and adding it through the Arduino IDE. Initialization requires specifying the SPI CS pin, baud rate (up to 1000kbps), and mode (normal, loopback, or listen-only). The library uses a Linux-like can_frame
structure. Sending and receiving data are achieved using sendMessage
and readMessage
functions, respectively. Receive masks and filters can be configured to selectively receive specific CAN frames. Examples are provided, including a CanHacker protocol implementation.
autowp/arduino-mcp2515
March 13, 2016
March 28, 2025
C++