I wanted to post a more general question to this forum as I got stuck with my Pi B+ (I consider myself as a beginner and the answer might be easy):
I am running a little code that measures the distance between an ultrasound module and an object (with hardware attached). Measurements occur every second, which is needed. The computer functions very well for some time (randomly, but in the ballpark of hours) but then all of a sudden, the program freezes. Only that particular code in that particular window is not responsive anymore. But I still can exit that problem via <CTRL>+C and restart that code. I also can still manage programs in other windows or edit code etc. while that program got stuck.
So - I was wondering if there is any buffer that gets filled up over time and which I would have to empty to avoid this problem.. ? If so, can I insert such a command in the code instead of restarting the Pi every day?
Sorry if this question sound stupid.
I changed distance reading to 1 min to stretch the time, but I really need that 1 sec interval.
Thanks in advance!