Constant string intensive programs fill up the small (8k) RAM and crash the microcontroller. The workaround to use PROGMEM is cumbersome and makes simple debugging statements into complex references to code located elsewhere. It doesn't read well. What kind of library rewrite work could be done to fix this limitation? For example, could the compiler automatically store string constants found within Serial.print("String") statements in PROGMEM, and could the Serial.print function be rewritten to load strings from PROGMEM?
look at the F() macro
http://forum.arduino.cc/index.php?topic=110307.0
etc.
How about a bigger microcontroller? Uno only has 2K SRAM, Mega2560 8K.
'1284P has 16K SRAM, twice that of a Mega.
http://www.crossroadsfencing.com/BobuinoRev17/
The F() macro looks like an elegant work-around. It need to be documented both on the serial.print() arduino reference page and on the PROGMEM page(PROGMEM - Arduino Reference). Is there someone who could do that?
The Bobuino looks great, to bad its so expensive.
The Bobuino looks great, to bad its so expensive.
What?
This is not expensive.
$22 for a kit is less than $29 for a new Uno.
True, that is without USB/Serial, but many folks have cables or other offboard modules and don't need embedded USB or to be saddled to a PC after programming.
It need to be documented both on the serial.print() arduino reference page
The documentation isn't clear to a new user why you would use F(). It says:
You can pass flash-memory based strings to Serial.print() by wrapping them with F(). For example :
Serial.print(F(“Hello World”))
Perhaps a better documentation could be:
Strings rapidly consume limited RAM. To instead store strings in the larger program flash-memory, wrap them with F(). For example :
Serial.print(F(“Hello World”));
Also, F() still needs to be added to PROGMEM.
What about an SD card adapter .. loads of R/W memory by comparison.