Use that Library to communicate with MCP2515
Implement communication with CAN bus via MCP2515 by CanHacker (lawicel) protocol.
- send & receive can frames
- supports standart (11 bit) & extended (29 bit) frames
- supports remote frames (RTR)
- supports filter by ID (mask + code)
- interface using Stream: ability to work with Serial, SoftwareSerial, Ethernet and other
- supported can baudrates from 10Kbps up to 1Mbps
- supported modules with different oscillators (8, 16, 20 MHz), 16 MHz is default, use setClock if your oscillator is not 16MHz
- support CanHacker (application for Windows)
- support CANreader (application for Android)
- Install MCP2515 Library
- Download the ZIP file from https://github.com/autowp/arduino-canhacker/archive/master.zip
- From the Arduino IDE: Sketch -> Include Library... -> Add .ZIP Library...
- Restart the Arduino IDE to see the new "canhacker" library with examples
Testes with Arduino Nano. On Arduino Uno have problem with too long boot period and losing first command
Feel free to open issues, create pull requests and other contributions