I'm using a Python script via (TkInter) on the Raspberry Pi to capture mouse movement and events. My goal is to send this data, in real time, to another connected Arduino device(Leonardo).
My first decision is how to connect-send this data. My understanding is that there are 3 main options:
- direct via USB
- Serial GPIO
Since both USB ports are being used I was opting for the 3rd method, serial GPIO. However, I am concerned with latency issues since one Python module RPi.GPIO mentions:
this module is unsuitable for real-time or timing critical applications
For serial GPIO there is also WiringPI which I'm guessing might have less latency issues since it is written in C and has a Python wrapper.
Can any Raspberry Pi / Python experts chime in? Would I be better of going with a USB solution to minimize latency?