Skip to main content

CircuitPython library for the Texas Instruments DRV8305 Three-Phase Gate Driver

Project description

Introduction

SPI driver for the Texas Instruments DRV8305 Three-Phase Gate Driver.

Patterned after the Adafruit BME280 CircuitPython driver, since that’s what I had lying around to hack, test, and compare against.

Installation and Dependencies

This driver depends on:

Please ensure that the driver and all dependencies are available on the CircuitPython filesystem. This can be most easily achieved by downloading and installing the latest Adafruit library and driver bundle on your device.

Installing from PyPI

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

pip3 install --user otterworks-circuitpython-drv8305

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

sudo pip3 install otterworks-circuitpython-drv8305

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install otterworks-circuitpython-drv8305

Usage Example

import time

import board
import busio
import digitalio

import otterworks_drv8305

spi = busio.SPI(board.SCK_1, board.MISO_1, board.MOSI_1)
cs = digitalio.DigitalInOut(board.P9_17))
drv8305 = otterworks_drv8305.OtterWorks_DRV8305(spi, cs)

while True:
    print(drv8305._get_warning_watchdog_reset())
    time.sleep(1)

Contributing

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

Documentation

TODO: build and share on readthedocs.org

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

otterworks-circuitpython-drv8305-0.0.1.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

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