Hi, as just 2-3 days ago I bought my first Arduino ,I'm still in the very beginning in the C programming and I have a question for something which probably is very simple. So I did a small sketch for 8 relays which are switching in a sequence for once activated by a photosensor .The program works fine, but after finishing the switching of the 8 relays the LED of the photoresistor remains on and the relays too. I want that after once you activate it with movement then it goes back in initial state so at another movement it will execute the sequence again and so on. I remember in the 80s as a kid I was using BASIC and there was a command like GOTO and you could go back someone in the previous line to repeat certain instructions.The sketch is attached .Thanks in advance.