Ah, i thought that writing to a db is fast? Coz i noticed that one can have time up to nano seconds, so i thought that means it is capable of writing to a db at that speed aswell. So when you say latency, any idea how much we are talking about?
Also, Maybe i could use some of the memory the arduino has and have all the data stored on the arduino first, as soon one instance of rapid distance change occurs, it saves on the arduino, then like 1 second afterwards it sends it to the db