One doesn’t need to support all the childish hacks that are built for pi. Just because a lot of noobs use something stupid does not make it correct or reasonable.
How to control the GPIO?
Dear Radxa,
I would like to have WiringPi and RPI.GPIO library for interfacing ready made examples for Raspberry Pi. I have noticed that FriendlyElec already ported those libraries to their Nano Pi M4. Unfortunately they violate the license agreement and their library are not open source, so no possible port to Rock Pi 4. You could inform them about their violation, they had copied opens source and made it like their own source??? We (buyers of Rock Pi) would expect also from Radxa, to port those widely used libraries made for Rpi.
Thank you.
We prefer to support WiringX, which is a more general library.
It doesn’t seem to support RockPi4.
I found a port of wiringX by Radxa, but it seems to be for Rock SBC rather than Rock Pi 4.
https://wiki.radxa.com/Rock/wiringX
Personally, I am plan to try using the GPIO via a bash or python script like here:
I have a good news The wiringX maintainer agreed to help us get ROCK Pi 4 supported. We will send him a kit. Let’s wait…
Sorry I missed your message. Of course you can.
@jack Could you please elaborate on this?
There is no apparent rhyme or reason to your example. Without clarifying the significance of each value or group of values, there is no way for me to figure out what I need to change, in order to discover the GPIO number for GPIO4_A3… After all, 11*9 + 9*4 + 22
is also 157, but you didn’t use that in your example…
Hi I understand some of the equation above don’t understand where the 8*3 part comes from!
Can you clarify this a bit more?
Hi,
Its explained in the Wiki:
GPIO4_D5 = 4*32 + 3*8 + 5 = 157
(A=0, B=1, C=2, D=3)
Hope its clear now.
Edit- image added to wiki.
Sorry I must have missed that!
I’m a complete newbie to Rock as I’ve always been a Raspberry Pi guy but loved the SFF of the S.
Thanks for your reply
Hi there.
Many thanks I’ve now got it working and currently looking at writing my own library to read multiple ports
Really grateful for the swift reply
Stay safe everyone!
Hi, I’m a newbye with libmraa.
I’m tryng to intergace an old OV7670 camera module, having 8 bit data output.
Is there a way for reading an entire bank (8bit) with one single instruction ?
If yes which is the command in cpp?
Hi jack,
To run “echo 157 > export” need change user to root. And I want my GPIO to be exported when system bootup, how to config a GPIO as exported by default?
Put it on /etc/rc.local
, you will have it when system booting up. It’s running as root.
It works.
Thank you!