PROGMEM is a keyword used when declaring a variable that keeps the data in flash instead of copying it into SRAM. It is part of the `pgmspace.h` library. Use this tag for discussions about using this attribute.
0
votes
3answers
27 views
How to store IR data needed for AC controll in less space?
I'm trying to controll an AC unit but the issue is space - right now, I store the data like this:
consts PROGMEM unsigned int Signal_Heat_Fan0_Temp30[] = ...
0
votes
1answer
52 views
Better method for PROGMEM data access with multiple indirection?
-edit-
This is a simplified recreation of personal learning project I have ongoing. My issue is in accessing data in flash, the path to which includes multiple layers of indirection. When the data ...
0
votes
2answers
52 views
Using PROGMEM to store array of structs
I am hitting the limits of my arduino's SRAM and found that SRAM usage can be reduced by storing static stuff in flash memory instead of SRAM.
My project can (optionally) be built with an included ...
0
votes
3answers
30 views
How do I upload sketch (and parameters) through a user interface
I'm pretty new to Arduino and I'm developing my first real-world project.
I have a Arduino Mega with a full working sketch in it which is going to be placed in several distant places and I have a ...
0
votes
1answer
36 views
Unusual behaviour when moving data to PROGMEM
I've got some working code with a definition that looks like this:
const unsigned char DynTextPositions[10][4][4] = {
...
};
Which is defined / referenced via a header:
#include ...
1
vote
1answer
28 views
Sketch stops printing after writing a few times
I am trying to build a random horoscope printer. I have a series of strings in an array which I am storing in program memory. I then pick a random number and print that index concatenated with a ...
4
votes
1answer
345 views
What are the benfits of global variables over static class members?
On an embedded system we use global variables often to keep dynamic memory consumption on heap and stack low. But global variables are also considered bad programming practice if they aren't used in a ...
0
votes
1answer
116 views
Data from PROGMEM array mismatches initialisation
The amount of memory needed for my user interface is outrageous. Hence I decided to use flash memory. But after some successful readouts from program space, problems emerge.
Updated:
I have some ...
5
votes
3answers
1k views
PROGMEM: do I have to copy data from flash to RAM for reading?
I have got some difficulties understanding the memory management.
Arduino documentation says, it is possible to keep constants like strings or whatever I don't want to change during runtime in ...
0
votes
1answer
100 views
question about progmem
I have a problem understanding the following code:
PROGMEM prog_uint16_t x={1232,3232,43343};
rawlen = pgm_read_word_near(x);
memcpy_P(uSendBuff, pfSendBuff+1, rawlen * sizeof(uint16_t));
Why do ...
7
votes
1answer
3k views
Can I write to Flash Memory using PROGMEM?
On the documentation of Arduino, I quote:
http://playground.arduino.cc/Learning/Memory
Note: Flash (PROGMEM) memory can only be populated at program burn time. You can’t change > the values in ...
3
votes
2answers
103 views
PROGMEM char* mangled text
I wrote a program using PROGMEM for massive string arrays. One of the arrays worked, but when I added the second one, the serial output only puts out "th".
Pastebin Code: http://pastebin.com/9U7QZQKn
...
0
votes
1answer
92 views
Unrecognizable Message From PROGMEM char*
I'm using a PROGMEM char* to store a massive array. When I try to print a certain part of the array, the message comes out mangled. How do I fix this?
The output should be "Poliwag", but it comes out ...
9
votes
2answers
4k views
Why can I not use pointers instead of array with PROGMEM?
I'm currently changing some libraries to use flash instead of RAM for string storage so that I do not run out of SRAM on a project.
Some strings in the library are declared in this manner:
const ...