I have noticed that my web editor also restart itself every so often just as shemtov reported and also the last few times I've started the web editor it seems to have saved an extra copy of my progran, real strange? I'm also having a problem getting my program to compile as I add more prints to the LCD, I get an error that says not enough memory? When I get the error I comment out a Lcd print and it compiles but I am running of dynamic memory? Do prints to the Lcd use dynamic memory? I have included my sketch if anyone would like to have a look and suggest if that is normal? I thought the Lcd prints would use program storage space instead of dynamic memory.
Anyone have any comments as it would be much appreciated.
Thanks
jessey
arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/020179001/build
-hardware arduino-builder/hardware -hardware arduino-builder/packages/cores -tools arduino-builder/tools
-tools arduino-builder/packages/tools -built-in-libraries arduino-builder/latest -libraries
/tmp/020179001/pinned -libraries /tmp/020179001/custom -fqbn arduino:avr:nano:cpu=atmega328
-build-cache /tmp -logger humantags -verbose=false -logger humantags /tmp/020179001/351W_The_Duke_copy_copy_copy
Sketch uses 13778 bytes (44%) of program storage space. Maximum is 30720 bytes.
Global variables use 2070 bytes (101%) of dynamic memory, leaving -22 bytes for local variables. Maximum is 2048 bytes.
Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint.
And as a side not, all these a, b, c variables are a really bad idea. Always use descriptive variable names. You shouldn't have to go look at a comment to see that a is "used to tell if alarm is on or off". Just call it something like alarmIsOn. I'm guessing that variable will never need to store more than a few values, probably just true or false so you could use a smaller data type such as bool or byte to save one byte of dynamic memory.
Thanks for your help. I did as you suggested and I can now see what you were talking about saving bytes of dynamic memory especially with all the prints to the Lcd. I'm going to try making it a practice from now on to start writing more efficient code. I didn't realize that all those blank spaces in my Lcd code were using so many bytes of dynamic memory. My program is a little too big for a nano because I want to add probably a minimum of 20 more prints to the Lcd for the instructions and possibly other add on's so I am going to code it over to a mega which will give me plenty of dynamic memory.