GPIO control from QT GUI using torizon

Hello,
I’m new to toradex platform but the documentation is really helpful.
I can get the examples working by following all the steps mentioned in the developer documents.
I could control GPIO from Visual Studio and from Bash using Torizon containers
I could run GUI front end and interact with it using VS Code and arm64v8-qt5-vivante-no-ssh_bullseye

The problem that I’m facing is I am not getting any reference for configuring GPIO with this GUI setup,
with the basic understanding, I had tried using the docker device addition run arguments but I think it is not sufficient. I’m not sure what I’m missing.
Can you point me to a reference where this concept is cleared? or is there a step by step guide / video that I could follow?

Thanks

Greetings @debesa,

Sounds like you want to do some action on the GUI that then affects the GPIO? Well we don’t have any examples of this since implementation can differ based on use-case and application.

But to give an idea/suggestion. We have examples C code of how to manipulate GPIOs with libgpiod: torizon-samples/gpio/c at bullseye · toradex/torizon-samples · GitHub

You could then use this as a starting point for your application. For example have some logic that when a GUI element is interacted with it triggers logic in the code that then manipulates GPIO in the way you want.

Also to clarify using docker device to add GPIOs only makes the GPIO available in the container. You still need to create code that then interacts with these GPIOs.

Best Regards,
Jeremias