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

WARNING: Spurious .github folder in 'Adafruit SSD1306' library
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,

                 from sketch\RetroWatchArduino.ino.cpp:1:

bitmap.h:1270: error: expected primary-expression before '__attribute__'

 PROGMEM const unsigned char* const bitmap_array[] = {


C:\Users\varun\Desktop\retrowatch-master\retrowatch-master\RetroWatch_Arduino\RetroWatchArduino\RetroWatchArduino.ino: In function 'void drawIcon(int, int, int)':

RetroWatchArduino:898: error: 'bitmap_array' was not declared in this scope

   display.drawBitmap(posx, posy, (const unsigned char*)pgm_read_word(&(bitmap_array[icon_num])), 16, 16, WHITE);


exit status 1
expected primary-expression before '__attribute__'

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

Information about the smart watch


PROGMEM is in the wrong loctaion. According to the Arduino Website:

Note that because PROGMEM is a variable modifier, there is no hard and fast rule about where it should go, so the Arduino compiler accepts all of the definitions below, which are also synonymous. However experiments have indicPROGMEM ated that, in various versions of Arduino (having to do with GCC version), PROGMEM may work in one location and not in another. The "string table" example below has been tested to work with Arduino 13. Earlier versions of the IDE may work better if PROGMEM is included after the variable name.

const dataType variableName[] PROGMEM = {};   // use this form
const PROGMEM  dataType  variableName[] = {}; // or this form
const dataType PROGMEM variableName[] = {};   // not this one

And I will add to that list:

PROGMEM const dataType variableName[] = {};   // and definitely NOT this one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.