Open HaleTom opened 5 years ago
Correct. It's actually more a safety check so that you don't poll the sensor too often. Thinking of it, I now would write the code such that you track the actual sample rate and and check it's not being called at a faster pace.
Why are you testing for < 1999 rather than < 2000 here:
Are you assuming that the overhead of calling the function will be 1ms, such that the duty cycle of 2000ms is maintained?