• Glad you got it sorted! What was the problem?

    Looking at your code, the following might help with memory usage:

    • You can use string[index] instead of string.charAt(index) and save a few characters, or for extracting a substring you could use substr,substring or slice (all of which do basically the same thing)
    • Instead of if (dw === 0) {lcd.print("Sun");} ... what about lcd.print(["Mon","Tue","Wed",...][dw]); - stuff like that will really compact your code.
    • I don't know what you intend, but if you define a variable in a function without adding var before it (eg. a=5 vs var a=5), that variable becomes global and will always take up memory. If you add the var before it then the variable is local to the function, and the memory it uses will be freed after the function is done executing...
About

Avatar for Gordon @Gordon started