Skip to content

bsundahl1/arduino-CAN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino CAN

An Arduino library for sending and receiving data using CAN bus.

Compatible Hardware

Microchip MCP2515/MCP25625 wiring

Microchip MCP2515 Arduino
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(...).

NOTE: Logic level converters must be used for boards MCP2515 which operate at 3.3V. The MCP25625 can run on 3.3V or 5V power, resolving this issue.

Espressif ESP32 wiring

Requires an external 3.3V CAN transceiver, such as a TI SN65HVD230.

CAN transceiver ESP32
3V3 3V3
GND GND
CTX 5
CRX 4

CTX and CRX pins can be changed by using CAN.setPins(rx, tx).

Installation

As this is a fork of https://github.com/sandeepmistry/arduino-CAN with additional patches, you have to use git to install this version of the library:

cd ~/Documents/Arduino/libraries/  # ~/Arduino/libraries on Mac OS
git clone https://github.com/timurrrr/arduino-CAN CAN

API

See API.md.

Examples

See examples folder.

License

This library is licensed under the MIT Licence.

About

Add support for 20MHz oscillator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.3%
  • C 0.7%