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.4.tar.gz (38.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file adafruit-circuitpython-mcp2515-1.1.4.tar.gz.

File metadata

File hashes

Hashes for adafruit-circuitpython-mcp2515-1.1.4.tar.gz
Algorithm Hash digest
SHA256 0883a63a43685354211d6a6bdb4f24bace1f340d45707c2187d90595d6e4ea78
MD5 18451a98cfbef868a3472798902b5746
BLAKE2b-256 fe4a3246349a7f102c105472574d976853fe54ecbb4985ca2b88884f80c10b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp2515-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ed2a93328e89d66c5934e17c0656c98d10a7a31c4dd51069b3a9923b2ef3334f
MD5 89203caf4eb90be6b6139f0d3d2378b4
BLAKE2b-256 03b8afa572d8dfe572fea1915eb2e36eb7570b1435c832902d4fb6a8ceb6078e

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