Skip to main content

A CircuitPython library for working with the MCP2515 CAN bus controller

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

A CircuitPython library for working with the MCP2515 CAN bus controller

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-mcp2515

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-mcp2515

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-mcp2515

Usage Example

import board
import busio
import digitalio
import adafruit_mcp2515

CS_PIN = 5
cs = digitalio.DigitalInOut(board.D5)
cs.direction = digitalio.Direction.OUTPUT
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
mcp = adafruit_mcp2515.MCP2515(spi, cs)

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_mcp2515-1.1.5.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit_circuitpython_mcp2515-1.1.5.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp2515-1.1.5.tar.gz
Algorithm Hash digest
SHA256 47aebfba5a7453e1251519fea276ff0d03bd0a124c8c6a6b1a71b25f736b8a9e
MD5 bab2695c665c08c7ef0865f783cbf531
BLAKE2b-256 1cdb76f009087a0cb4f70a72fce9278a6f9ac35d06b907120f7fb0498b5bf21f

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_mcp2515-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp2515-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf57997e9790a187ffe5d051e6df4b2a575b66197111bcd18639aa7f92682fcb
MD5 b21c344562b9722b5e47ffdf94754800
BLAKE2b-256 cfb0566e7dd72899e08c8c089f615dc28a8307f1ef00945f8f23fccbc1490ccf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page