How to run two functions simultaneously?
I really appreciate any sort of help or comment, I want to run two functions simultaneously such that the first function monitors mouse coordination and the second one talks to the serial port, both in a real-time frame. On the other hand, the first function is supposed to trigger/alert the second one whenever the mouse coordination is at (x1,y1). What is the best possible method to do that? P.S.: Please note that I’m not asking about how to talk to serial port or capturing the mouse position, the question here is how to run these two functions at the same time and passing a variable from one to the other in a real-time frame.