Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programming error #20

Open
riadd123 opened this issue May 25, 2022 · 1 comment
Open

programming error #20

riadd123 opened this issue May 25, 2022 · 1 comment

Comments

@riadd123
Copy link

Arduino: 1.8.19 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

In file included from C:\Users\SEFATF~1\AppData\Local\Temp\arduino_modified_sketch_212439\RetroWatchArduino_u8glib_no_button.ino:32:0:

bitmap.h:1269:42: error: variable 'bitmap_array' must be const in order to be put into read-only section by means of 'attribute((progmem))'

PROGMEM const unsigned char*bitmap_array[] = {

                                      ^

RetroWatchArduino_u8glib_no_button:123:32: error: variable 'weekString' must be const in order to be put into read-only section by means of 'attribute((progmem))'

PROGMEM const char* weekString[] = {"", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};

                            ^

RetroWatchArduino_u8glib_no_button:124:32: error: variable 'ampmString' must be const in order to be put into read-only section by means of 'attribute((progmem))'

PROGMEM const char* ampmString[] = {"AM", "PM"};

                            ^

RetroWatchArduino_u8glib_no_button:161:30: error: variable 'strIntro' must be const in order to be put into read-only section by means of 'attribute((progmem))'

PROGMEM const char* strIntro[] = {"Retro", "Watch", "Arduino v1.0"};

                          ^

exit status 1

variable 'bitmap_array' must be const in order to be put into read-only section by means of 'attribute((progmem))'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

what should i do?

@VrajChariot
Copy link

PROGMEM const char* const weekString[] = {"", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
PROGMEM const char* const ampmString[] = {"AM", "PM"};

use this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants