simple 8-segment-display code works via Linux but fails via Mac ?

Hello,

I have a simple program (listed below) that compiles and uploads to the Arduino Uno without errors. The code counts from 0 to 9 on a 8-segment-led-display.

When I upload it from Linux (Debian Jessie arduino 1.0.5) it works fine.
When I upload the same code from Mac (OSX 10.8.5 arduino 1.0.5) it gives garbled digits on the display.

I added some debug information with Serial.Print to check the value of ‘i’ and ‘1<<i’ . Output of debug values are identical on both Linux and Mac.

What am I missing ?
What else can I do to get this to work via the Mac ?

(All my other programs work perfectly via the Mac.)

const prog_uint8_t digits[10] = {
  B11011101,  // = 0
  B01010000,  // = 1
  B11001110,  // = 2
  B11011010,  // = 3
  B01010011,  // = 4
  B10011011,  // = 5
  B10011111,  // = 6
  B11010000,  // = 7
  B11011111,  // = 8
  B11011011   // = 9
};  

void setup() {
   //  8 segment KingBright SC03-12GWA LED Display
   //  led=pin:a=6,b=7,c=9,d=10,e=11,f=13,g=12,DP2=8
  for (int i=6; i <= 13 ;i++) {
    pinMode(i, OUTPUT);
  }
  Serial.begin (115200); 
}

void schrijfCijfer(int cijfer) {
  byte data = pgm_read_byte (&digits[cijfer]);

for (int i=0; i<8; i++) {
  digitalWrite(13-i, data & (1<<i) );
  Serial.print ("i= " );
  Serial.println (i,DEC);
  Serial.print ("1<<i= " );
  Serial.println (1<<i,DEC);

}
}  

void loop() {
 for (int i = 0; i < 10; i++ ) {
   schrijfCijfer(i); delay(4000);
 }
}

The problem is probably a difference in how the two version of the compiler deal with PROGMEM declarations. I suspect one of them puts your array in PROGMEM and one doesn't. Instead of:

const prog_uint8_t digits[10] = {

try something like:

const uint8_t digits[10] PROGMEM = {

If that doesn't work, try other variations. Eventually you should find a syntax that both interpret the same way.

Thanks, this solves my problem!

paul