nickeh Posted November 30, 2020 Posted November 30, 2020 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
Solution TRS-80 Posted December 1, 2020 Solution Posted December 1, 2020 (edited) There is https://github.com/vsergeev/python-periphery which is somehow related to https://github.com/sgjava/java-periphery, the developer of the latter (@sgjava) is regular around here and I know at least his software is actively developed. Edited December 1, 2020 by TRS-80
nickeh Posted December 1, 2020 Author Posted December 1, 2020 Thanks, that looks very promising. Now I just need something to read the ADC (none of the above seems to handle ADC?) pin...
Recommended Posts