Pages: [1]   Go Down
Author Topic: Correction to PROGMEM tutorial  (Read 866 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the PROGMEM tutorial has an error in it (or maybe it's due to a compiler bug.

Basically, this line:
PGM_P PROGMEM string_table[] =

needs to be changed to:
PGM_P string_table[] PROGMEM =

It won't work unless progmem comes after the array variable declaration the same way that the strings are declared in the preceeding lines. This wasted most of a morning before I discovered why it didn't work, so fixing it will prevent someone else from being stuck on the same problem.



Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
Karma: 12
Posts: 3538
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I updated the example.

Pages: [1]   Go Up
Jump to: