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.

Using GPIO ports on orangePi zero3

Featured Replies

Hi,

 

Running on Armbian_community 24.8.0-trunk.529 Bookworm with Linux 6.6.43-current-sunxi64 onthe orangepi zero3

And need to use the GPIO pins with python, not an expert here but have tried a few recommandations with no luck.

Can anyone suggest method that works with the above OS/build please?

 

Thanks!

 

Rob.

  • Author

Yes I did thanks with no luck, I've since moved away from using the GPIOs.
Have an embedded PIC micro for this project hence I've moved all GPIO functions to this and used  serial comms from the orange to this micro to kick off the GPIO stuff.
But the good part that I did pick up was that the orange has TWO serial ports which the original doc. only said it had one. Hence that came in super handy!!


Rob.

I might need to use the serial port pins, instead of USB-serial adapters.

 

What did you activate in system>hardware? (or post your armbianEnv.txt)

 

Can the 2 serial ports work with 230400 baud? (lidar snesors) Can they work with pyserial?

  • Author

Hi,

Not sure about those speeds, I'm running "slighly" slower @19200 🙂

Here's what inside  armbianEnv.txt:

Used verbosity=1
bootlogo=false
console=both
disp_mode=1920x1080p60
overlay_prefix=sun50i-h616
rootdev=UUID=f7af041d-782e-4204-ac39-37060a9a922b
rootfstype=ext4
overlays=uart2-ph uart5-ph
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

  • Author

Sorry missed the part on pyserial. Yep works fine, seen as /dev/ttyS1 and /dev/ttS2

 

Thank you!

 

The first serial port is the debug serial port (probably UART2), the second is UART5 in the 26 pin terminal.

 

Are you able to use UART2? I think it would only be owned for boot up messages and a bash session.

  • Author

No probs. 

You can use all three actually, I'm pretty sure  ttys0 is the debug port. 

But in my instance I'm using the two ports on the 26way connector s1&s2 for general comms. Via pyserial

And debugging via the three pin debug port which is s0. 

  • Author

Don't have the pin out in front of me but yes, unfortunately shared with other comms protocols spi & i2c.  Never explored the other header, think it's a 10way. But wonder if they could be used as well for comms.  

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.