Jump to content

Access GPIO from Python3 as non root on a Rock Pi S (5.9 kernel)


Go to solution Solved by TRS-80,

Recommended Posts

Posted

Hi,

 

what options do I have to access the GPIO from Python3 as a non-root user? I'm building a project based on the Rock Pi S and I have everything working (as root, i2c, GPIO) on the Radxa Ubuntu 18.04 image but as I wanted to future proof the project by using the 5.x kernel.

 

I started with the latest Armbian_20.11_Rockpi-s_focal_current_5.9.10_minimal and enabled the i2c bus from armbianEnv.txt (rk3308-i2c1) (was already active) because the armbian-config didn't work. So I managed to get the oled display to work with the same library (luma.oled) I used on the 4.4 kernel.

Then I wanted to install libmraa that I used on 4.4 but noticed was not available.

 

After some googling I found these options:

ArmbianIO

UserspaceIO

pyGPIO

 

but most of them seems to be deprecated so then I found libgpiod but havn't found alot of documentation yet. Is this my (only?) option or are there others?

 

Best regards

Nicke

 

Posted

Thanks, that looks very promising. Now I just need something to read the ADC (none of the above seems to handle ADC?) pin...

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines