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.