While delay(1000) should block for around 1 second, the example doesn't take into account the use of delay() elsewhere. It would be more accurate to note the time of the last sample in loop(), and trigger a new sample when more than 1000ms have elapsed; while examples should be kept simple, this, along with a comment for why it is preferable to blindly using delay(), could be educational for the reader who is unfamiliar with that approach. The advice in the readme to change the default period in the algorithm from 1 second is also ill advised because this could be overwritten in an update, and the code could usefully mention the constructor variant that takes a sample period. Arguably better still, only have a constructor that takes a sample period, though this would now break existing code.
Regarding the delay(), we will consider using this method in future. As you said, to show the timings transparently in the example the delay() is an easy option.
You are right, using the specific constructor is the proper way to initialize the algorithm for a different sampling rate. The README is updated accordingly and the low power example uses this constructor.
While
delay(1000)
should block for around 1 second, the example doesn't take into account the use ofdelay()
elsewhere. It would be more accurate to note the time of the last sample inloop()
, and trigger a new sample when more than 1000ms have elapsed; while examples should be kept simple, this, along with a comment for why it is preferable to blindly usingdelay()
, could be educational for the reader who is unfamiliar with that approach. The advice in the readme to change the default period in the algorithm from 1 second is also ill advised because this could be overwritten in an update, and the code could usefully mention the constructor variant that takes a sample period. Arguably better still, only have a constructor that takes a sample period, though this would now break existing code.