Managed to get it to work perfectly but setting the pin to HIGH once inside the 5 second while loop. Thanks for the help!