We want to parallel record 3 sensor/switch data. Also after an interval of time send all this data to an enternal server using wifi ESP8266. but the problem is when i send data to server it takes 3-4sec . And during this time a lot of sensor data is missedout. The sensor output is after every 70 ms . And all sensor data is very important can’t miss any.
Now i want to do both operations simultaneously on arduino. Parallel record values and timely send the data to server over internet
I am using arduino mega2560 atmel microcontroller. So do all operation
How much data are you sending when it takes 3-4 seconds? If you are sending less than 4/.07 = 58 bytes, you have a problem. Otherwise, use a circular buffer, at least large enough to handle two packets of data. Collect the sensor data in a timer ISR so that will happen regardless of what the ESP8266 is doing