Questions tagged [progmem]

40 questions
1
vote
1 answer

issues with pointers and PROGMEM

I am programming on an Arduino UNO, and have encountered a very annoying road block. Im having a really odd issue with PROGMEM, I have narrowed it down to an issue with a pointer array. When I index the PROGMEM array with a variable j. It returns…
1
vote
1 answer

Arduino - Trouble with PROGMEM a avr/pgmspace.h

im trying to use progmem instead on static char to save some valueble space. Everything seems fine, but serial and lcd show some weird newline symbol instead of my text. What im trying to do: ... #include const static char PROGMEM…
1
vote
1 answer

Struggling to get ESP8266 on Arduino Uno working reliably with AT communication

I am struggling to get ESP8266 connected to an Arduino Uno working reliably as a webserver. The firmware of my ESP8266 is 1.1.1 - I don't have the option (or knowledge) to update it at the moment. Below is my code. It works, barely, if I serve a…
garrettlynchirl
  • 790
  • 8
  • 23
1
vote
1 answer

Adding more data in PROGMEM breaks SPI transfer on Arduino Mega 2560

I'm working on a small project (or so I thought) involving an Arduino Mega (2560) and a Waveshare ePaper display. I've got it working alright with the library (epd7in5) and I've added two images into PROGMEM. But as soon as I add a third image (and…
Topple
  • 13
  • 3
1
vote
1 answer

PROGMEM error on MacOS High Sierra Arduino Mac 1.8.5

I'm using MacBook Pro running on MacOS High Sierra. There is a problem whenever i tried to upload Arduino code containing PROGMEM to store raw HTML string (Arduino Mac 1.8.5) to my ESP board. The board that i'm using is ESP8266 LoLin V3. Exception…
1
vote
0 answers

Concatenating char[] with another char[]

I'm finishing up an Sketch with the Arduino IDE and to be able to run it on UNO, I have to work with C char[]. Which has not been easy for me and I already asked something regarding this a short while ago. I need to create a longer char[] by…
Marcal
  • 1,371
  • 5
  • 19
  • 37
1
vote
1 answer

PROGMEM variable discarded even if declared as (used)

I'm using ATMEL Studio 6.2 and its toolchain with avr-gcc (avr8-gnu-toolchain). I have a variable that needs to be placed in flash (PROGMEM) and I declare it as a global: static const uint16_t gPrgLen PROGMEM __attribute__((used)) = 0; The compiler…
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
1
vote
2 answers

How to make a 1D PROGMEM array (stored in Flash) of 2D PROGMEM arrays on AVR (ex: ATMega) or Arduino microcontrollers

I have several 2D arrays in PROGMEM. I want to store them into another array, hence having a PROGMEM array of 2d PROGMEM arrays. Then I want to read the data out. Here's what I have void myFunc() { const static byte DATA1[3][2] PROGMEM = { …
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
1
vote
1 answer

PROGMEM get single char from string array?

I'm trying to get individual characters from a string array to write to an LCD display on Arduino. Only I'm not really getting any valid data back. LCD Write code: void LCD::drawString(uint16_t x, uint16_t y, uint16_t color, uint16_t background,…
Gelunox
  • 772
  • 1
  • 5
  • 23
1
vote
1 answer

Using Function Pointer from struct in PROGMEM in C on Arduino

I am trying to read a function pointer from a structure stored in PROGMEM, then passing a value (input) to the corresponding function and save the returned value, but i can not find the correct syntax. uint8_t (*pStateFunc) (uint8_t); uint8_t input;…
1
vote
1 answer

Adafruit gfx library drawBitmap without PROGMEM

So im trying to put byte array of image in external eeprom (c24LC16B) and use drawBitmap() function in Adafruit gfx library to draw it on Nokia 3310 LCD (with Adafruit PCD8544 library). But the problem is, that the drawBitmap() can use only static…
Seran
  • 31
  • 1
  • 4
1
vote
1 answer

3D array of strings

I'm trying to make an LCD project (16x2) that cycles through groups of messages. The idea being that it will cycle through all the messages in the currently selected group and won't leave the group until manually changed. Originally I had a 3D…
drent
  • 239
  • 1
  • 2
  • 7
1
vote
1 answer

How to prevent strings from beeing multiple times in PROGMEM

I am trying to safe some program space by trying to reduce the count strings in progmem. So i started to put all stings which are needed multiple times into a file with a namespace: #include #ifndef __PSTRINGS__ #define…
bemeyer
  • 6,154
  • 4
  • 36
  • 86
1
vote
1 answer

C++/Arduino Passing pointer to 2D array stored in PROGMEM

I have several const int 2D arrays globally stored in PROGMEM. for example: const int image1[][17]PROGMEM = { {1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0}, {1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0}, {1,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0}, …
CyrielN
  • 89
  • 11
0
votes
1 answer

How to use #define for get filename without file extension and store it to PROGMEM

I want to get the name of the compiled file without extension as a constant in PROGMEM. Partially the name can be cleared like this: #define __FILENAME__ strrchr(__FILE__, '\\') + 1 Okay, it's easy. Next I need to delete the file extension, I can…
N_A
  • 3
  • 2
1
2 3