Pololu Power Switch; Problems with Shutdown out of the Software

Hi guys.

i try to realise a geocaching-box and have a problem using the pololu power switch for shutting down the arduino one out of the software. i made sure powersource and arduino are connected over the powerswitch and additionally connected the µC (PIN 13) to the OFF of the powerswitch. in the code i define the PIN and set it to LOW in the void setup.

problem: when i power the arduino through the switch, it starts and afterwards shoutdown immediately. after i disconnected the OFF-connection, arduino starts and stay on. thats why i guess that the PIN for the OFF-function is set to HIGH in the moment the arduino starts and shutdown the system even bevor the PIN can be set to LOW.

do anyone have an idea, how i can set the PIN to LOW earlier, or how i can solve the problem in generel?

would be glad if someone could help me. thanks already!

Use a different pin. The bootloader flashes the LED on pin 13. (Assuming your unmentioned board is like most Arduino boards.)