All Forums > Programming Questions

constant lists for lcd display application

(1/1)

SamMarco:
I'm working on an application with an LCD and several text strings. Due to the Arduino RAM restrictions, I would like to use constant strings. Anyway the use of


--- Code: ---const char message = "this is a message";
--- End code ---

is useless because this const only affects to the write property of message, but it is placed in RAM instead of ROM.

I have seen those


--- Code: ---prog_char miss00[] PROGMEM = "Message again";
--- End code ---

I experience some hangs-up (reboot) in the Arduino.

What do you recommend me? I'm sure that there may be another posts about the same topic but I don't find them.  :-X

bds:
refer to the arduino reference on PROGMEM.

http://www.arduino.cc/en/Reference/PROGMEM
at the bottom of the page you should find the section titled 'Arrays of strings'.

This should sort your troubles.

Navigation

[0] Message Index

Go to full version