/Adafruit_Trellis_Python

Python library for using the Adafruit Trellis on a Beaglebone Black or Raspberry Pi.

Primary LanguagePythonMIT LicenseMIT

Adafruit Trellis Library For Python

This is a direct port of the Adafruit Trellis library to Python and intended to run on the Beaglebone Black, Raspberry Pi, or other embedded system with Python and I2C support.

Mobile Upload

Dependencies

This library requires the Adafruit_I2C library is available. You can install this library by following:

Installation

To install, download this repository and execute setup.py as root:

sudo python setup.py install

Usage

The functionality of the library is almost exactly the same as the standard Trellis library. The important differences are:

  • The Adafruit_Trellis class begin() method takes both an I2C address and I2C bus number. This is to support devices with multiple I2C buses.

  • The Adafruit_TrellisSet class can use an arbitrary number of Trellises instead of being limited to 8. With a device that has more than one I2C bus (like the Beaglebone Black), you can control more than 8 Trellises! Note that each I2C bus is still limited to only 8 Trellis devices.

See examples of the library usage in the examples folder. Note that you probably need to run scripts as root so they can access the I2C bus. For example to run the TrellisTest example execute:

sudo python TrellisTest.py

Changes

  • v1.0

    • Initial release