Skip to main content

Questions tagged [progmem]

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.

1 vote
2 answers
176 views

I'm working on a project where I want to implement something like a FORTH interpreter on Arduino. The interpreter consists of "WORDS," where each WORD has a name, a header, and an array of ...
gilhad's user avatar
  • 1,466
-1 votes
1 answer
215 views

Problem Description: I’m trying to interface a Waveshare 1.69-inch LCD module (ST7789V2 driver, 240x280 resolution) with an Arduino UNO board. I’ve connected all the necessary ports as per the ...
Skymero's user avatar
-1 votes
1 answer
326 views

I have three large PROGMEM arrays, in order to store musical notes for a song. One array is the notes, one is the note durations, and one is the pause after the note. The first array is an int one and ...
user1584421's user avatar
  • 1,435
2 votes
2 answers
487 views

I'm using the DuinoWitchery LCD library (https://github.com/duinoWitchery/hd44780) in a PlatformIO Arduino project with CLion. The following code works if I stick it in main.cpp: // near top of class.....
Bitbang3r's user avatar
  • 561
-1 votes
1 answer
128 views

In pgmspace.h, PROGMEM is defined as __ATTR_PROGMEM__, which is defined as __attribute__((__progmem__)). AFAIK, __attribute__ is GNU only. Since C++ 11, we have the attribute specifier sequence. I can'...
Thomas Weller's user avatar
5 votes
4 answers
1k views

Is it possible for a function/method to know if a constant array that has been passed in is in flash or RAM? If I have a method or function that receives a constant array that is in RAM, the array is ...
Casey's user avatar
  • 151
1 vote
2 answers
519 views

It's been harder than I expected to find a reference source or usage guide. There's a number of sources I've looked at along the road to this question: The Due is listed here and here as having 512KB ...
RowanP's user avatar
  • 869
0 votes
1 answer
107 views

I have a 2d array: const byte messages_for_measurement[2][8] PROGMEM = { { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }, { 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10 }, }; I want to send ...
user1584421's user avatar
  • 1,435
1 vote
1 answer
1k views

Disclaimer: I just started using C++ and I'm a bit of a beginner. Keep that in mind as your answering. So I recently bought my first Arduino. It's a customized one and it has an 8x8 display attached ...
gurkensaas's user avatar
1 vote
2 answers
959 views

Given: const char* PROGMEM names[] = {"Foo","Bar"}; Serial.print(names[0]); I get garbage output. Is there some function that will print the string from PROGMEM? E.G.: Serial.print(<function name&...
Bob Jones's user avatar
  • 131
0 votes
1 answer
140 views

Using ESP8266 (NodeMcu 1) in Arduino IDE: I can't upload my sketch because a single call to strcpy_P seems to increase the IROM usage by about 400%: 25% total usage without the call, 100+% with the ...
user187's user avatar
  • 13
3 votes
2 answers
765 views

I'm using an Arduino Due where double have a size of 8 bytes. In my software, I use double table const stored in prog memory, I was using an UNO before and used pgm_read_float_near() to retrieve these ...
snoob dogg's user avatar
0 votes
2 answers
1k views

I have a class which has a const char * property: class A { public: const PROGMEM char* text; }; void setup() { // A a{"Hello World!"}; // A a{PSTR("...
zhekaus's user avatar
  • 459
0 votes
1 answer
2k views

I have an ESP8266 program that used to work but is now failing to compile with this error: C:\...\Arduino\libraries\WiFiManager/WiFiManager.h:25:24: note: in expansion of macro 'PROGMEM' const ...
garson's user avatar
  • 159
0 votes
1 answer
2k views

This is a somewhat tricky question dealing with implementation and best-practices of the ESP8266. I'd ideally hope that it's answered by people with in-depth knowledge on the problem. As you are ...
user avatar

15 30 50 per page
1
2 3 4 5