sgjava Posted January 1, 2018 Posted January 1, 2018 OPi.GPIO uses the GPIO Sysfs Interface for Userspace. I worked with the author to add Nano Pi Duo pin mappings including the built in button. The obligatory LED flasher for Duo: import time import nanopi.duo from OPi import GPIO GPIO.setmode(nanopi.duo.BOARD) GPIO.setwarnings(False) GPIO.setup(7, GPIO.OUT) GPIO.output(7, GPIO.HIGH) count = 0 while count < 20: print(count) GPIO.output(7, GPIO.LOW) time.sleep(0.5) GPIO.output(7, GPIO.HIGH) time.sleep(0.5) count += 1 GPIO.cleanup()
Tido Posted January 1, 2018 Posted January 1, 2018 sysfs is depricated - does the author know that ? https://forum.armbian.com/topic/5655-armbianio-api-proposal/?do=findComment&comment=46618
sgjava Posted January 1, 2018 Author Posted January 1, 2018 I'm not able to find a RPi.GPIO like wrapper for libgpiod. This is essential to use a lot of Python code out there written against RPi.GPIO.
Recommended Posts