Fail safe led circuit
simulate this circuit &ndash; Schematic created using CircuitLab

User Choices

LED Off until initialized as output with value = "0" ,

May be inverted to 1 = ON with LED  cathode to 0V an 1k to Anode.

LED reverse voltage &lt;=5V is OK