Hi,
I am new to this forum and QT applications. i hope the message is in right place.
i have an ARM9 development board running linux on it. without using GUI i can use all devices on the board like hardware buttons (as interrupts), ADCs, eeproms etc...
For external buttons, ı use this example (simply)
fd = open("/dev/button", 0);
if (fd < 0) {
perror("error open device");
exit(1);
}
for (;;)
{
char buttons[3];
read(fd, buttons, sizeof buttons);
printf("%s %s %s", buttons[0] , buttons[1] , buttons[2] );
}
fd = open("/dev/button", 0);
if (fd < 0) {
perror("error open device");
exit(1);
}
for (;;)
{
char buttons[3];
read(fd, buttons, sizeof buttons);
printf("%s %s %s", buttons[0] , buttons[1] , buttons[2] );
}
To copy to clipboard, switch view to plain text mode
this prints the buttons state as 0 or 1
How can i implement this to GUI. how can i read device data continuesly in a fast way? i want to connect a rotary encoder and count the number of pulses. using the console applıcation no problem but how can i make this using QT?
thank you
Bookmarks