Delay() inside STARUP() = SOS

Hello folks,

I have a function that is called on STARTUP() of a Photon. When I add a Delay(500) in that function the Photon SOS when it starts.

The documentation is a bit thing on what type of code can run on STARUP() so I’m not sure if this behavior is by design or not. If it is, it would be worth to document.


The point of startup is to execute as soon as possible - putting in a delay will stall the rest of the system too :exclamation: If you want a delay, then it makes most sense to put that in setup(), since delay() internally tries to run the background cloud loop.

STARTUP() happens very early on. Only the hardware peripherals are available for use.

1 Like