First post so go easy on me!
My base level of programming is VB but am just getting to grips with the basics on Arduino.
I am trying to build an application using a Nano and ESP8266, the basics of the application is to monitor a machines status including cycle time and production count and then send that information via the ESP to a listener IP.
The Nano monitors a digital input (cycle count), this can vary from 2sec to 30sec, so if i try and send anything by WIFI (using AT commands) the delays needed for establishing a connection and sending data will cause the loop to miss a count. In VB i would have created multiple threads to make this work but that's not possible?
I have looked at an interrupt, I have already set one up to monitor the voltage line for power loss and write the counter values to EEPROM, this works great because it processes so fast. The bit i am unsure about is that if i use an interrupt for the machine cycle it will process up to every 2sec, this will not allow the sending of the data?
It may be possible to trim some time off the delays but it needs to work as a disconnection process as there will be up to 50 machines online, i only need to send machine data maybe every 5mins or so but each time it stops the monitoring of cycle count.
I didn't think it was worth posting the code so far because the current code does what it is supposed to, its more a process conundrum and methodology that i need some guidance with if anyone has any ideas?
Maybe run 2 Nano's and get one to send the data while the other carries on processing?
Thanks in advance
Simon