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.

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

Featured Replies

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

 

Solved by TRS-80

  • Author

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.

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.