If you look closely I am actually using B0 and B1 to replace A2 and A3 in the code so that is not the culprit.
And yes you are right hat the "rand" is for faking the actual analog readings with random number for testing client side views. That part works and I get good readings before it jams when overloaded by multiple clients. Client is a web page with jQuery ajax calls rendering values with highcharts to gauges and charts. The situation is easily reproduced by having several web pages requesting the Espruino simultaneously.
What should be the timeout on the client side? I use 5 seconds. And 500 ms repeat interval.
After the Espruino server is flooded and stops responding in timely fashion, all the clients start to time out and they all have to be removed until it recovers. Still some requests go through slowly every now and then (the capture above). Those requests are seen in wireshark, but no reply.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
If you look closely I am actually using B0 and B1 to replace A2 and A3 in the code so that is not the culprit.
And yes you are right hat the "rand" is for faking the actual analog readings with random number for testing client side views. That part works and I get good readings before it jams when overloaded by multiple clients. Client is a web page with jQuery ajax calls rendering values with highcharts to gauges and charts. The situation is easily reproduced by having several web pages requesting the Espruino simultaneously.
What should be the timeout on the client side? I use 5 seconds. And 500 ms repeat interval.
After the Espruino server is flooded and stops responding in timely fashion, all the clients start to time out and they all have to be removed until it recovers. Still some requests go through slowly every now and then (the capture above). Those requests are seen in wireshark, but no reply.