Beaglebone Black

Installation

To install the Trellis python library on the Beaglebone Black follow these steps:
  • Make sure python 2.7 is installed on your Beaglebone Black. If you're using the Angstrom, Ubuntu, or Debian operating system python should already be installed. However if you aren't sure, run the command 'python --version' (without quotes) at a terminal and look for an output like 'Python 2.7.3'.
  • Install the Adafruit_BBIO python library. There's a great guide right here to walk through the installation.
  • Download the Trellis python library to the Beaglebone Black and unzip the archive. You can execute these commands to do both:
Download: file
wget https://github.com/tdicola/Adafruit_Trellis_Python/archive/master.zip
unzip master.zip
  • Install the library by navigating to the folder and executing setup.py:
Download: file
cd Adafruit_Trellis_Python-master
sudo python setup.py install

Usage

The Beaglebone Black by default has 2 I2C buses which means you can have up to 16 Trellises attached at once (8 per I2C bus). This is a good blog post that explains where the I2C pins are located, but as a summary you can use:

  • P9 pin 17 and 18: Channel 0 SCK and SDA
  • P9 pin 19 and 20: Channel 1 SCK and SDA

Connect Trellis power and ground to the Beaglebone 5V power and ground pins respectively (P9 pin 7 or 8 for power, and P9 pin 1 or 2 for ground).

If you're using the Trellis INT wire as a key press interrupt, connect it to any digital GPIO pin on the Beaglebone Black. The Trellis python library doesn't use the interrupt pin directly, so you'll want to monitor the pin yourself in your code.

Finally to check the Trellis is detected and confirm which I2C bus it's on, run these commands to probe each I2C bus:
Download: file
sudo i2cdetect -y -r 0
sudo i2cdetect -y -r 1
Trellis should be detected at addresses starting with 70, like 70, 71, 72, etc.
This guide was first published on Feb 13, 2014. It was last updated on Feb 13, 2014. This page (Beaglebone Black) was last updated on May 20, 2019.