I want to use the esp8266 for PC controlled robot control. I send all 10 ms data from the esp to the PC, and sometimes data from the PC to the esp.
Sending data all 10 ms from the esp to the PC works great, but whenever I send some data from the PC to the esp, the esp "freezes" for around 40 ms, e.g. it does not send out data for that time period.
I first thought to blame the mqtt lib for that, but now I made the same thing over an connected TCP socket, and got exactly the same result.
I was expecting some milli secs delay for the tcp/ip stuff the cpu has to deal with, but 40 ms for one packet receive is a bit much for a 80 MHz CPU.
I can supply source code if wanted.
This is my mesured output. The first number is the millis on the PC when printing out, the 2nd is the millis on the ESP when sending the value.
1470321366141 got value: 709552 sensor1=10
1470321366150 got value: 709562 sensor1=10
1470321366161 got value: 709572 sensor1=10
1470321366171 got value: 709582 sensor1=10
1470321366182 got value: 709592 sensor1=10
Sending new value 11
1470321366191 got value: 709602 sensor1=10
1470321366231 got value: 709641 sensor1=11
1470321366240 got value: 709651 sensor1=11
1470321366250 got value: 709661 sensor1=11
1470321366260 got value: 709671 sensor1=11
1470321366270 got value: 709681 sensor1=11
Any thoughts on that?