Apr-09-2018, 08:10 PM
It's common to put a small sleep() in there for programs that are meant to run for very long periods of time, that way it doesn't eat the processor's time when it really doesn't need to. For example, at the end of your while loop, add a
time.sleep(0.01)
.