if pin 1 is high in 3seconds led will turn on else ignore .(if statement .help.)

there is no problem with the correct code.

Then post that code.