Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4439

Polling in GTK python application

$
0
0

So, I have built a GUI application via GTK, with buttons, labels, etc. I have connected a sensor in the laptop's USB which sends a signal when triggered. What I want to achieve is the following: While the application with the GUI is running, to have a separate function that at the same time will scan the sensor and read its values, to check if it is triggered (True). Any idea how to achieve that?

I am trying solutions such as this one here: "Using a custom condition callback function" https://polling2.readthedocs.io/en/latest/examples.html#use-a-custom-checker-to-decide-whether-your-target-has-returned-what-your-waiting-for but I do something wrong and does not work....I do not know how to use it correctly.


Viewing all articles
Browse latest Browse all 4439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>