What is the preferred way to wait for something to finish? i.e. turn on a switch for [x] amount of time and turn off the switch after [x] amount of time? I am currently using delay() and it seems like a bad way to do things given pausing the processor can lead to unforeseen problems down the road in the application code.
Serial.println(“delaying for ten seconds”);
Any help/guide is appreciated, I am using the BoronLTE & Electron3G for this application.