Rock pi s GPIO library link

hi all

pls give me link for rock pi s GPIO access library.

because I try so much but I don’t find any libmraa library for rock pi s

1 Like

We recently added libmraa support on ROCK Pi S, you can refer on this:

https://wiki.radxa.com/RockpiS/dev/libmraa

Hi. I am a linux newbie and I am trying to install libmraa for GPIO programming.
I installed Debian Buster and I followed the link you’d given.

I added the following to /etc/apt/sources.list.d/apt-radxa-com.list

deb http://apt.radxa.com/buster-stable/ buster main <== 1line : It is already there.
#deb http://apt.radxa.com/buster-stable/ buster main <== 2line : It is already there.
export DISTRO=buster-testing <== 3line : I add it like the link said.

Then exit apt-radxa-com.list and type this in shell.

/#echo “deb http://apt.radxa.com/$DISTRO/ ${DISTRO%-*} main” | sudo tee -a /etc/apt/sources.list.d/apt-radxa-com.list

Finall my apt-radxa-com.list is

deb http://apt.radxa.com/buster-stable/ buster main
#deb http://apt.radxa.com/buster-stable/ buster main
export DISTRO=buster-testing
deb http://apt.radxa.com// main

Then Get the pub key

wget -O - apt.radxa.com/buster-testing/public.key | sudo apt-key add - <== install OK

Install essential packages

sudo apt-get update
I got errors.
E: Type ‘export’ is not known on line 3 in source list /etc/apt/sources.list.d/apt-radxa-com.list
E: The list of sources could not be read.

Could you help me??

Sorry, there is a mistake of that guide. But it is corrected. Check that link again.

You can do the following steps.

Firstly, add the following to /etc/apt/sources.list.d/apt-radxa-com.list

deb http://apt.radxa.com/buster-stable/ buster main
deb http://apt.radxa.com/buster-testing/ buster main

Secondly, execute the commands.

wget -O -  apt.radxa.com/buster-testing/public.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y rockchip-overlay rockpis-dtbo libmraa-rockpis

Needed packages are installed.

Please note that there are some differences between the system images when setting interface like i2c, uart, etc. Check this link, https://wiki.radxa.com/RockpiS/dev/libmraa, for more details.

1 Like

Now, it works.
Thanks. Great support!!

Hi.
I am making a project with Rock PI S.
The project is using lua and I want to add led control to this project.
So is it possible to use libmraa with lua??

I googled and found it. But I don’t understand whether it could be used with lua or not…

现在支持ubuntu 了吗?之前只支持Debian

ROCK Pi S Ubuntu system 也支持 libmraa。

I follwed the installation and it looked like being installed.
But I can’t import the library in python.

import mraa
print(mraa.getVersion())

python3.7 test.py

ModuleNotFoundError : No module named ‘mraa’

So I checked whether it installed or not.

#rpm -ql libmraa
package libmraa is not installed
#rpm -ql libmraa-rockpis
package libmraa is not installed

What did I wrong??

Hi. I´m pretty new in linux and I’m just trying to start with Rock Pi S. I´ve downloaded latest version of Debian and I was able to modify uEnv.txt to add overlays

As the original question in this post I’m having some trouble to get started with lbrmraa.

When I´ve tried to follow the instructions , in this step:

wget -O - apt.radxa.com/buster-testing/public.key | sudo apt-key add -

I get this response:

bash: wget: command not found
gpg: no valid OpenPGP data found

The next steps:

sudo apt-get update
sudo apt-get install -y rockchip-overlay rockpis-dtbo libmraa-rockpis

works fine, but when I try to test GPIO with

root@rockpis:/# mraa-gpio list

I get this:

bash: /#: No such file or directory

I´ve already checked that:

deb http://apt.radxa.com/buster-stable/ buster main
deb http://apt.radxa.com/buster-testing/ buster main

are in: /etc/apt/sources.list.d/apt-radxa-com.list.

I’ve also tried with ubuntu and I hace exactly the same problem.

I´m sorry if my lack of knowledge is the biggest problem, but any help regarding this issue will be deeply appreciated.

Best Regards

Gonzalo Guerrero

you need to install wget first.
sudo apt-get install wget

Thanks a lot.

Wget works!

But the other problem is still there when I try to test GPIO

root@rockpis:/# mraa-gpio list

I get this:

bash: /#: No such file or directory