Interfacing with GPIO, UART, SPI, I2C etc

How do one goes about interfacing with the GPIOs and the various serial pins on the Radxa Zero from a C/C++ program that is written and compiled on it?

Add mraa or wirepy support for Radxa Zero is on our to-do-list.

3 Likes

Thats cool. I am waiting for this one.
Also, is it gonna be possible to get gpios to work on Android based OS?

Sounds great! Can prioritise mraa? Since libmraa have bindings to Python and applications written in C/C++ would be substantially faster compare to Python, especially for a resource constrained device like Radxa Zero.

Nice news! My zero will be here with in a week. I’d like to replace a raspi zero of my system with the Radxa zero. That uses gpio, I2C and PWM. When do you think it will be available?
Thanks.

Add mraa or wirepy support for Radxa Zero is on our to-do-list.

Can we get the status of this support? Really wanted to work on SPI with Zero. Thanks.

it would be awesome to use i2c on this board, do you have any news about it?

Hi. To use spi, i2c, please see this guide. https://wiki.radxa.com/Zero/Debian#common_hardware_interface

1 Like

:clap: Hi. Please see https://wiki.radxa.com/Zero/dev/libmraa

1 Like

Thanks for your team’s quick work! :clap::clap::clap::+1::+1::+1:

Great work! I’ve been waiting for this, thanks very much.

i used to use pigpiod library in raspberry pi zero to use i2c communication in python, is there anything like that in radxa zero ubuntu ?

pigpio is a raspberry pi specific gpio library. it can not work with radxa zero. WiringPi is a more general gpio library. We are also porting it to Radxa Zero.

We are looking forward to it

is there any other python library for i2c communication ?

i installed mraa on zero and man, it was perfect, the communication speed with my sensor using i2c is at least 10x faster than raspberry pi zero, congratulations to the developers

1 Like

Can you share some little introduction on how to use mraa for SPI?

Hi. See this guide. https://wiki.radxa.com/Zero/dev/libmraa

Hi,

I want to use UART with a GPS HAT for Raspberry Pi.
I enabled “overlays=meson-g12a-uart-ao-a-on-gpioao-0-gpioao-1”,
deleted “console=ttyAML0,115200” in /boot/Env.txt.
and connected the GPS module to Pin#8 and Pin#10,
but my Radxa Zero won’t boot.

Other UART options are OK such as meson-g12a-uart-ao-b-on-gpioao-2-gpioao-3, meson-g12a-uart-ao-b-on-gpioao-8-gpioao-9 and meson-g12a-uart-ee-c. I got NMEA2 messages via /dev/ttyAMLx.

I use the Radxa Zero v1.4 with 4GB mem and 32GB eMMC model and radxa-zero-debian-buster-xfce4-arm64-20211121-0245-mbr.img.gz.

Any suggestion?
Thanks.

1 Like

One reason may be that GPS module sends data to Radxa Zero via GPIOAO_1 pin in U-Boot stage and abort U-Boot boot process.

You can try to set CONFIG_BOOTDELAY to -2 in radxa-zero_defconfig to disable input abort. And upgrade your U-Boot on board.

1 Like