The Arduino does not execute commands when I unplug the Arduino.. It only executes commands when I press the restart button

I think that we're missing some details. Any Arduino will reset if you remove and re-apply the power.

  1. Which Arduino are you talking about?
  2. Which SMS module / shield are you using?
  3. By unplugging, do you mean disconnect from the PC?
  4. How do you power the Arduino? Via USB? Or with and external power supply? If the latter, what exactly.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.