Help needed - Sketch controlling 8-relay module via a GSM SIM 800L module not working after unplugging and reconnecting power to the setup!?
Hi folks
I am new to the world of electronics and Arduino, but are eager to learn, because I think it is really cool and fun to make your own electronic gadgets, and use them afterwards to various practical things.
I have made a setup, that consists of 1 pcs Arduino Uno, 1 pcs 8 channel relay module, 1 pcs GSM SIM 800L module & 1 pcs 5 volt 2,5 Amp power supply. The power supply, supplies all the modules with a common GND (see also power connections description in the sketch).
I have made a sketch, which is patched together from other coders sketches, and own minor changes and additions.
After uploading the sketch to the Uno, the setup works fine, and as intended, but only if the power supply are turned on and connected to the setup as well during upload. The setup continues to work fine, after unplugging the USB cable from the computer, with the power supply still turned on and connected.
If the power to the setup is unplugged and then later reconnected to the setup, nothing works!? In order to get the setup to work again, I have to reconnect the USB cable and either start the seriel monitor from IDE, or upload the sketch again with the power supply turned on and connected !?
I have attached the sketch (it was too long to insert here)
I have spend weeks searching the web to find a explenation/solution, but without luck, so I am hoping one of you guys can help with an explanation to what is wrong, and a solution to resolve this problem.
Thanks in advance
