RobG Posted August 22 Share Posted August 22 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. 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted August 24 Share Posted August 24 Did you try this? 0 Quote Link to comment Share on other sites More sharing options...
RobG Posted August 28 Author Share Posted August 28 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. 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted August 28 Share Posted August 28 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? 0 Quote Link to comment Share on other sites More sharing options...
RobG Posted August 28 Author Share Posted August 28 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 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted August 29 Share Posted August 29 Thank you! 0 Quote Link to comment Share on other sites More sharing options...
RobG Posted August 30 Author Share Posted August 30 Sorry missed the part on pyserial. Yep works fine, seen as /dev/ttyS1 and /dev/ttS2 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted September 3 Share Posted September 3 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. 0 Quote Link to comment Share on other sites More sharing options...
RobG Posted September 3 Author Share Posted September 3 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. 0 Quote Link to comment Share on other sites More sharing options...
robertoj Posted September 4 Share Posted September 4 I noticed the second serial port in the 26 pin connector it is in the same pins as SPI1 0 Quote Link to comment Share on other sites More sharing options...
RobG Posted September 4 Author Share Posted September 4 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.