Code only runs when programmed. Not after reboot

Hey everybody, hopefully this is the right place to post this… I built a project that uses an Arduino Uno, LED, switch, and a 16x2 serial LCD display. Basically, you press the button and the screen will display how you will die. the issue is that if I upload the code to the Uno, it works perfectly. If I disconnect the USB cable or otherwise remove power to the Uno, when it boots up next, nothing happens! I even put serial print commands in the code for debugging, but I don’t even get that to show… Nothing will work at all, until of course I re-upload the code. This project needs to be powered on for an entire month, and right now, if there is any power interruption, The project will not function until I reprogram the Uno.

If anybody knows how to help, it would be greatly appreciated.

Notes: (also see [attached code)

LCD Screen Pinout

SCREEN ARDUINO

VSS GND

VDD +5v

contrast resistor-ground

RS 2

R/W 3

enable 4

data4 9

data5 10

data6 11

data7 12

backlight+ +5v

backlight- gnd

LED

pin 6 to +, led - to resistor/gnd

Button

pin 5](http://ge.tt/8s6X7P8)

I’m not sure why, but you have 7 pins listed for the lcd display where my code has 6. I think pin 12 might have something to do with the ISP header, so maybe voltage on that pin during boot is causing it to enter a non-functioning mode without the reset being sent from the usb bus. So maybe try and move some of your pins around and see if anything works better. The push button will work fine from an analog port if you want to free up some digital ports.