How can I use mraa?

Hello! !

I’m also a newbie, so I can’t say much, but I installed it as follows.

  1. RockPi’s official libmraa cannot be downloaded, and the explanation Wiki is currently unavailable.
    https://wiki.radxa.com/Rockpi4/dev/libmraa

  2. However, I would like to use a library to use GPIO.

  3. There are not many GPIO libraries like RaspPi.

  4. RockPi has no choice but to use mraa.

  5. By the way, the mraa library itself is a general-purpose library and is compatible with RockPi, as announced on the official website.
    https://github.com/eclipse/mraa/blob/master/docs/rockpi4.md

  6. Therefore, we have determined that the RaspPi method is also valid for installation.

  7. Although it is a Japanese site, there was a site with instructions on how to install it, so I installed it using that as a reference.

  8. Currently, I have installed this method and there are no problems.


sudo apt update
sudo apt install git build-essential swig python3-dev cmake libjson-c-dev
git clone https://github.com/eclipse/mraa
cd mraa
mkdir build
cd build
cmake -DBUILDSWIGNODE=OFF …
make
sudo make install
sudo ldconfig

Reference: Eclipse MRAA on Raspberry Pi 4 - Python