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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_mcp2515-1.1.2-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for adafruit-circuitpython-mcp2515-1.1.2.tar.gz
Algorithm Hash digest
SHA256 ee5865286cb0caa57650f1afc49aa80b3ccd82e54c42ab953142ceddfe9d72da
MD5 bddcdccab6829538393cd0c75f67137c
BLAKE2b-256 d8dabf9f4562a7b0a2fe5040608ee409fafc0574be78f0fd8ce703cde6809354

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adafruit_circuitpython_mcp2515-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 013f54db317e66808641c076a28ad264553fc0a7b2d480074a5c5b056419e8eb
MD5 6ebcd3c25f0f71ed1e31b02bbdbc1f11
BLAKE2b-256 418d084cf4d4de74e985cd609f5c9dd1e6870cf8e5034bb569d13173475f0dd1

See more details on using hashes here.

Supported by

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