Python GPIO Library for the Rock64 (R64.GPIO)
#17
(04-27-2018, 03:04 PM)Leapo Wrote: Looking over their code... might be useful, but their interrupt implementation is pretty thin compared to RPi.GPIO

Current progress: One interrupt feature is in. The background threading required to implement the others is slowing me down a bit, but I'm still working on it.

Hi Leapo,

First off, thanks for taking the time to port RPi.GPIO lib to Rock64 !

I have a Rock64, running Armbian 5.42 Ubuntu Xenial minimal (4.4.124-rk3328) and trying to use the R64 GPIO lib .

I read your note, stating testing was done on using Ayufan's release 0.5.15 and other distros/versions are not guaranteed to work, yet I want to inquire of a certain error I am receiving.

I used the "prefered" way of getting the lib, downloading the R64 directory and running the script in the same path as it.
The module seems to be imported, yet I get some errors when exporting the the GPIO pin, like below:


root@rock64:/home/pi/projects# cat gpio_test.py
import R64.GPIO as GPIO

pin = 16
GPIO.setmode(GPIO.BOARD)
GPIO.setup(pin, GPIO.OUT, initial=GPIO.HIGH)
#GPIO.setwarnings(False)

root@rock64:/home/pi/projects# python gpio_test.py
Error: Unable to export GPIO
Error: Unable to set GPIO direction
root@rock64:/home/pi/project


I want to add , I tried the script as 'root', as at first I believed it could not write tot he '/sys/class/gpio/export' file. I tried mode BCM (pin=23), ROCK(pin=101), BOARD(pin=16), always getting the same error.

If I try to set pin 16 to "out" via bash, it works, but only If I add an offset of 1000, i.e 101 becomes 1101. Could this be the reason why the R64.GPIO lib fails, where should I go about to add this offset in the lib if possible ?

Thanks!
  Reply


Messages In This Thread
RE: Python GPIO Library for the Rock64 (R64.GPIO) - by AnythingIsFine - 05-11-2018, 02:56 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Disable MicroSD reader for extra GPIO mxruben 0 341 07-27-2024, 10:08 PM
Last Post: mxruben
  Rock64 No Audio @ Debian 12 dmitrymyadzelets 2 1,175 04-08-2024, 06:47 AM
Last Post: dmitrymyadzelets
  OpenWRT on the Rock64 CanadianBacon 14 11,083 04-03-2024, 08:48 AM
Last Post: helpmerock
  Rock64 bricked shawwwn 7 7,154 03-17-2024, 12:22 PM
Last Post: dmitrymyadzelets
  Rock64 won't boot luminosity7 10 6,202 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 781 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  How well does Rock64 deal with HDR and Atmos on Kodi? drvlikhell 3 2,804 04-29-2023, 04:24 AM
Last Post: newestssd
  Rock64 board not working, no HDMI no Ethernet. EDited 3 4,327 01-17-2023, 02:31 PM
Last Post: Flagtrax
  ROCK64 v3 can it boot from USB? Tsagualsa 4 3,045 11-29-2022, 11:31 AM
Last Post: Macgyver
  rock64 v3 spiflash Macgyver 0 1,086 11-28-2022, 02:18 PM
Last Post: Macgyver

Forum Jump:


Users browsing this thread: 2 Guest(s)