With the arduino nano how can I read an input at the same time that I read the text messages of the sim800L

Hi everyone!

I am working with an arduino nano and the Sim800L, but I am having a problem, when I consult the incoming text messages of the sim800L, which are checked using a loop, if while this happens I try to read an input by means of a button, this signal is loses, since the messages of the sim800L were being read while the input was pressed, so i would like to know how can i read the two at same time

I look forward to a prompt response
Thanks

Don't use for-loops or while-loops. Have a look at Robin's Serial Input Basics - updated to get ideas for non-blocking reads of the serial interface.

Further read Demonstration code for several things at the same time ; there are more articles on the web like this one.

Replied within 10 minutes, hope that that is prompt enough :joy:

1 Like

Not at EXACTLY the same time. Mainly you want to avoid any code that blocks other processing. The following tutorials will help you understand:

BlinkWithoutDelay

Arduino Multiple Things

Several Things at a Time

1 Like

thank you very much for your quick response, i will read this articles!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.