I have a requirement wherein I need to measure the distance travelled (Real-time) and display it on an app on a tablet present inside that moving vehicle. I have a setup wherein I have connected the encoder to the pi using the GPIO pins and the app is connected to the pi using bluetooth.
I tried to put in the readings of the encoder into a file and send the contents over to the app per second. But, the pi seems to miss a lot of these readings, owing to concurrency issues, probably.
So, what could be some alternative way to do this, any suggestions are Welcome!