Minimizing delay over WIFI!

Hi again ! :slight_smile: I’ve been messing around with a few data transfer methods such as the HTTP library for the spark core and the web hooks. Due to the nature of my project i’d like to keep the delay about under a second. I’m having issues however doing so. The HTTP library reports delays ussually of above 1000 ms while the webhook seems to be quite slow aswell.

So my question is what are my alternatives if I want to minimize the delay when transfering data ? Should I try to use UDP ? I’ve also noticed that in the HTTP library the connection is closed every time in the POST method. Should i perhaps change the code so that the connection stays open while i throw out post requests ?

thanks :sunny:


In my local subnet I’ve had good results with UDP(aslong you avoid some of the quirks ;-)) but you could also just go with the TCPServer/TCPClient.

If you don’t (permanently) need cloud connection, SYSTEM_MODE(SEMI_AUTOMATIC) will cut away some lag due to cloud-keeping too.