Skip to content

Commit

Permalink
Merge pull request #714 from makermelissa/missing-bbio
Browse files Browse the repository at this point in the history
Add better error message and explicity add to setup
  • Loading branch information
makermelissa committed Sep 15, 2023
2 parents 5138b16 + 0f15234 commit fe8a29e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
or b"brcm,bcm2711" in compat
):
board_reqs = ["RPi.GPIO", "rpi_ws281x>=4.0.0", "sysv_ipc>=1.1.0"]
if (
b"ti,am335x" in compat
): # BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.
board_reqs = ["Adafruit_BBIO"]

setup(
name="Adafruit-Blinka",
Expand Down
8 changes: 7 additions & 1 deletion src/adafruit_blinka/microcontroller/am335x/pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
#
# SPDX-License-Identifier: MIT
"""AM335x pin names"""
from Adafruit_BBIO import GPIO
try:
from Adafruit_BBIO import GPIO
except ImportError as error:
raise RuntimeError(
"The library 'Adafruit_BBIO' was not found. To install, try typing: "
"pip install Adafruit_BBIO"
) from error


class Pin:
Expand Down

0 comments on commit fe8a29e

Please sign in to comment.