Hi all,
I am workign on an project that requires it to connect to an iridium modem by redblock. I ti uses serial communication to talk to.
I also use cellular data and USB at the same time.
My question is with regards blocking strategy, the sat modem is not fire and forget, I need to know if the message was sent or not and if not retry again.
At first though i was thinking on trying to separate functionality with a thread, where I can write to serial and wait for a response… but how can i make it so that the wait does not halt the rest of the program tasks?
Is there like a way to separate in a thread a block of code or a good strategy to implement this some how?
What would you do.
I need to keep track of whats being sent and what the modem confirms as sent and what the OK responses correspond to what command. So it is not as simple as having a Serial.Print and wait somewhere for an OK. I need to know what that OK corresponds to. So my first guess was to use a blocking strategy (wait until an OK gets sent back) but without stopping the rest of the tasks from happening…
Is there a good best practice? I couldn’t find anything in the documentation.
Thanks!