Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Python 3 gpiod module error

Featured Replies

Hi, I've been trying to get the next IMU sensor to work:  Fusion_IMU_BNO055, on my OPi zero with Armbian Bionic 20.08.10 with the linux kernel 5.8.14-sunxi. I have installed everything from the official Adafruit guide but I still get the same error.

 

I have followed all the steps of this guide for beginners: OPi_r1_guide, executing all the commands successfully.  However, I still have the same error in Python that is related to the "board" module. 

 

root@orangepizero:/home/Test# python
Python 3.6.9 (default, Oct  8 2020, 12:12:24)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/board.py", line 82, in <module>
    from adafruit_blinka.board.orangepi.orangepizero import *
  File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/board/orangepi/orangepizero.py", line 5, in <module>
    from adafruit_blinka.microcontroller.allwinner.h3 import pin
  File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/microcontroller/allwinner/h3/pin.py", line 4, in <module>
    PA0 = Pin(0)
  File "/usr/local/lib/python3.6/dist-packages/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py", line 34, in __init__
    self._chip = gpiod.Chip("gpiochip0", gpiod.Chip.OPEN_BY_NAME)
AttributeError: module 'gpiod' has no attribute 'Chip'
>>> exit()

 

The python code that I try to execute is the following:

 

import board
import digitalio
import busio

print("Hello blinka!")

# Try to great a Digital input
pin = digitalio.DigitalInOut(board.PA6)
print("Digital IO ok!")

# Try to create an I2C device
i2c = busio.I2C(board.SCL, board.SDA)
print("I2C ok!")

# Try to create an SPI device
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
print("SPI ok!")

print("done!")

 

If you need more details I will gladly give them to you. Thank you.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.