switch on a led for 5 sec and turn off??

You realise the simple version in reply #3 version doesn't actually meet your requirements?

@OP: If you only want code written for you and don't want to put in any effort, will you please post in "Gigs and Collaborations"?