Documentation Feedback

First post here and I’m not sure if this is in the correct category or not…

Either way, I’ve set up my first device and it was straightforward enough. I set up a DHT11 sensor (all I had handy at the time) on an ESP8266. One thing I stumbled upon was trying to understand that the thing.handle() function is really the only thing that should belong in the loop() function, and that the polling interval is remotely defined.

Specifically under “calling endpoints” where the text reads “do not add delays inside the loop method” it might help to mention that there is no delay required, as the polling interval is server side. Further to that, clarification on whether blocking delays vs non-blocking delays (while(millis() < (start + delayTime))) are tolerable during resource definition.

Hi @aonomus you are right about the polling interval. Each resource can be configured remotely by the server to be streamed periodically as required.

Adding delays inside the loop would affect in the communication between server and device. If you want to call endpoints periodically, it is required to do some delay based on timestamps (using millis), like the blink without delay example from Arduino.

https://www.arduino.cc/en/Tutorial/BlinkWithoutDelay