Non-blocking HTTPClient GET possible?
Posted: Thu Mar 30, 2017 1:15 pm
Wonder if anyone could share their experience designing responsive Arduino sketch that calls HTTPClient?
Call to HTTPClient.GET() is long, 1 second for a successful call or takes 5 seconds to timeout if URL host is disconnected. This means everything sketch loop() (UI, logics, polled buttons, etc) are blocked and the device is irresponsive before HTTPClient.GET() returns.
More specifically on this case, I was wondering
1. Is HTTPClient.GET() and subsequent call path properly "Arduino yield()"ed?
2. Any scheduler exist that works with above "Arduino yield()" scheme? or a yield scheme that HTTPClient already implemented to facilitate a main/UI task + HTTPClient task.
Thanks,
Stan
Call to HTTPClient.GET() is long, 1 second for a successful call or takes 5 seconds to timeout if URL host is disconnected. This means everything sketch loop() (UI, logics, polled buttons, etc) are blocked and the device is irresponsive before HTTPClient.GET() returns.
More specifically on this case, I was wondering
1. Is HTTPClient.GET() and subsequent call path properly "Arduino yield()"ed?
2. Any scheduler exist that works with above "Arduino yield()" scheme? or a yield scheme that HTTPClient already implemented to facilitate a main/UI task + HTTPClient task.
Thanks,
Stan