nmarcelo / opcn2-Arduino

C++ Library for the Alphasense OPC-N2 particle counter-Arduino
3 stars 4 forks source link

sampling period #1

Closed semajoel closed 6 years ago

semajoel commented 7 years ago

Is there any development on control of the sampling period. What is noticed is that the delay in the loop function affecting the sampling period printed in the serial.

nmarcelo commented 7 years ago

I think in this code it is not possible, since the histogram is captured in the loop. The histogram must be captured in an independent function to avoid the delay due the others operations in the system. Thread approach could be adecuate for the sampling period control. https://github.com/ivanseidel/ArduinoThread