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
VDD +5v
contrast resistor-ground
RS 2
R/W 3
enable 4

data4 9
data5 10
data6 11
data7 12
backlight+ +5v
backlight- gnd

pin 6 to +, led - to resistor/gnd

pin 5

Jacqui_s_box.pde (3.49 KB)

I'm on a Windows machine at the moment, so I cannot count the string length easily, but I suspect you are running out of RAM. Each string declared is stored in Flash, BUT, when the sketch starts, it is all copied at runtime into Flash.

Try with only 2 or 3 strings.

(I reckon your string array is about 1754 characters, you only have 2K total)

Try using PROGMEM:

Each string declared is stored in Flash, BUT, when the sketch starts, it is all copied at runtime into Flash.

Is that what you meant to write? ;)

I didn't try the PROGMEM but i did try shortening down my array from about 150 words or so to just method1, method2, method3. Still, the same problem persists.

And if that isn't weird enough, If I unplug the arduino and plug it back in, about 1 in 100 times it will load the code and work. all the rest of the time it does not. After some more investigation, it even does this with the HelloWorld that is in the LiquidCrystal Example folder!

If you have the problem even with standard sketches, it is probably not a software problem.

backlight+ +5v backlight- gnd

Could it be the backlight uses too much power for the Arduino regulator? Can you disable it to see what happens?

I had this problem once with a backlit LCD.

I had the same problem with my uno. Turned out to be a bad boot loader, I got a new boot loader emailed from sparkfun reflashed it and was good to go.