Nvidia with qt

I want to know how to access GPIO using qt creator. I have written the code in c++

Hi @walihullah,

We have done with using system commands. You should know the gpio pin number for configuring.

system(“echo 508 > /sys/class/gpio/export”);
system(“echo out > /sys/class/gpio/gpio508/direction”);
system(“echo 509 > /sys/class/gpio/export”);
system(“echo out > /sys/class/gpio/gpio509/direction”);
system(“echo 510 > /sys/class/gpio/export”);
system(“echo out > /sys/class/gpio/gpio510/direction”);

For setting the pin as high,
system(“echo 1 > /sys/class/gpio/gpio508/value”);

For setting the pin as low,
system(“echo 0 > /sys/class/gpio/gpio508/value”);

Hope it works.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.