Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4873

General discussion • How do I manage the I/O ports on the pi4?

$
0
0
I need to manage the I/O ports from qt5.
I applied the following code but it doesn't work.

Code:

QFile exportFile("/sys/class/gpio/gpio19/export");exportFile.open(QIODevice::WriteOnly);exportFile.write("19");QFile directionFile("/sys/class/gpio/gpio19/direction");directionFile.open(QIODevice::WriteOnly);directionFile.write("in");QFile edgeFile("/sys/class/gpio/gpio19/edge");edgeFile.open(QIODevice::WriteOnly);edgeFile.write("body");
How do I manage the ports without using any libraries?

Statistics: Posted by AlexeyGolubev — Sun Sep 29, 2024 6:25 am



Viewing all articles
Browse latest Browse all 4873

Trending Articles