This post only serves to provide users with a resolution to the following error. The error occurs when a user downloads the Sparki “standalone” library for use with Linux operating systems, or the standard Arduino IDE on any OS, and attempts to compile a program.
Note: See roboalchemist’s reply to this post. His solution is much more efficient than the one I suggest here.
An example compilation error output:
Robot_Control/glcdfont.c
/usr/share/arduino/libraries/Robot_Control/glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
static unsigned char font[] PROGMEM = {
This happens due to the fact that newer versions of Arduino catch and hang on this during compilation.
To resolve the issue:
- Go to the Sparki library. In my case, it is in Documents\Arduino\Libraries.
- Open the “Sparki.cpp” file.
- Go to the line that contains the string " uint8_t font[] PROGMEM = { " It should be located above a 5x7 font table.
- Change " uint8_t " to " unsigned const int "
- Save the file.
- Restart the IDE
This solution worked for me. My programs upload without a hitch.