A Particle library for sending and receiving data using CAN bus with MCP2515. Based on https://github.com/sandeepmistry/arduino-CAN, with small changes to be compatible to Particle.
The library is only tested with the mesh modules Argon, Boron and Xenon. Older generations have an on-chip CAN controller.
- Microchip MCP2515 based boards/shields
Microchip MCP2515 | Particle |
---|---|
VCC | 5V |
GND | GND |
SCK | SCK |
SO | MISO |
SI | MOSI |
CS | 10 |
INT | 2 |
CS
and INT
pins can be changed by using CAN.setPins(cs, irq)
. INT
pin is optional, it is only needed for receive callback mode. If INT
pin is used, it must be interrupt capable via attachInterrupt(...)
.
See API.md.
See examples folder.
This library is licensed under the MIT Licence.