I would like to use interrupt to terminate setup() and follow to proceed loop() indefinitely.
However attachInterrupt(1, loop, FALLING); does not work,because it triggers loop() only once.
I tried to have a separate interrupt function,like:
attachInterrupt(1, interruptfunction, FALLING);
//my other setup code,including
//all other setup code depends on conditions interruptSetup==false,which forces everything to terminate as quicky as possible to loop,if interruptSetup is true.
However,problem is in long delay in setup() and assigment interruptSetup=true; in interruptfunction().Due to 30second delay,it is almost sure that interrupt will be triggered during delay().As long as interruptfunction() contains assignment interruptSetup=true; interrupt wont interrupt delay, instead it will only assign value to interruptSetup and wait until delay finishes.
I suppose,that usually this does not cause a problem,because delay intervals typically use to be really short,but I can’t obviously wait 30 seconds to get response which I expect immediately.
Any ideas how to fix this?