L flashes Rapidly, bricked Bootloader?

My issue is that the 13pin LED flashes very rapidly. hitting the reset button stops the flash for only as long as the button is pressed. Uploading sketches fails and the programmer "does not respond."

I have read the forums the past few days and discovered many different methods of reset button presses timed precisely or uploading immediately after plugging in USB. but none of these work.

It seems that I have busted the bootloader.

I decided to deal with fixing the chip later, I bought a new UNO today but I wanted to know what exactly could be causing this problem so I didn't do the same mistake.

I am dealing with a two dimensional array with a lot of values. 24*90 byte values.
I had read that it could be possible that an improperly created array or one that is too large, could overwrite the bootloader.

Would anyone take some time to look at my code and let me know if anything is really not right?

Thanks in advance,
Harvey Moon

(This program is adapted from an 8x8 LED matrix. I am running a homemade LED light strip directly from the arduino pins, I would like to swing this LED strip and create a POV type image as it swings. the Angle advances as it swings, and progresses across the 90 values. 24 lights are connected in a row.)

#include <FrequencyTimer2.h>

#define ANGLES 91
#define PASSES 25

byte image[][ANGLES] = 
{




{23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23},
{24,24,23,23,24,24,23,23,23,23,23,23,23,23,24,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,23,23,23,23,23,23,23,23,23,23,23,23,22,22,23,23,23,22,22,22,22,22,22,22,22,21,21,21,21,21,21,22,22,22,21,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23},
{23,24,24,23,23,23,23,23,23,23,23,23,21,20,17,14,14,11,10,5,4,3,3,3,3,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,2,2,2,2,2,2,2,2,2,2},
{23,24,24,23,22,20,16,11,9,6,5,5,2,2,2,2,2,2,1,2,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1},
{23,23,23,22,20,13,9,3,3,3,3,2,2,2,2,1,2,1,1,2,2,1,2,1,1,1,1,1,1,1,2,1,1,2,2,2,2,2,1,2,2,2,3,2,2,2,2,2,3,3,3,2,2,2,2,2,1,1,2,2,2,1,1,1,1,1,2,2,2,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1},
{24,23,23,23,23,20,11,4,4,3,2,2,3,2,2,2,1,1,1,1,2,2,2,2,3,2,2,3,4,6,8,9,10,11,13,14,15,15,16,16,16,17,17,17,17,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17,16,15,15,15,14,13,12,11,10,9,8,7,7,6,6,5,4,5,4,4,3,3,3,3,2,2,1,1,2,1},
{24,23,24,23,23,22,23,17,10,4,3,3,2,3,2,2,2,2,2,3,2,3,4,5,7,10,13,15,16,17,17,18,18,19,19,19,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,22,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,20,20,20,20,20,20,19,18,18,17,16,15,14,11,11,9,8,6,5},
{23,24,24,24,24,23,24,24,24,20,13,4,4,3,2,2,2,2,3,3,2,4,5,7,10,14,15,17,17,18,19,19,19,19,20,20,20,20,20,21,20,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,21,21,21,21,21,20,20,21,20,20,20,19,19,19,19,18,18,17},
{24,24,24,23,24,24,23,24,24,24,24,23,24,14,5,5,2,2,2,2,3,2,4,5,6,9,13,16,17,17,18,19,19,19,19,19,20,20,20,20,21,21,21,21,21,21,21,22,22,22,22,22,22,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,21,21,22,21,21,21,21,20,21,21,20,20,20,19,19,19,19,19,19,18},
{24,23,24,24,23,24,24,24,23,24,24,24,24,24,23,23,23,16,5,3,3,2,2,3,3,4,7,12,15,16,17,17,19,19,19,19,20,19,20,20,20,20,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,21,22,22,21,21,21,21,21,21,21,20,20,20,20,19,19,19,19,19,19,18,18,18,17,17},
{24,24,23,24,23,24,24,24,24,23,24,24,23,23,24,24,23,24,24,24,23,12,1,2,2,2,2,5,15,16,16,16,16,10,9,9,8,8,8,7,5,5,4,4,4,3,4,4,5,7,9,10,13,16,18,19,19,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,20,20,20,20,19,19,19,18,18,18,18,17,17,17,17,16,16,16},
{24,23,23,23,23,23,24,24,24,24,23,24,23,24,23,23,24,24,24,23,24,24,23,23,14,3,2,2,3,16,17,16,16,15,16,15,13,8,10,0,10,6,2,2,6,3,0,17,4,13,10,11,13,14,16,19,20,20,20,19,18,16,15,13,11,9,7,8,5,5,5,5,6,8,11,14,16,17,17,17,17,17,16,16,16,15,15,15,14,13},
{23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,23,24,23,23,24,15,16,15,14,10,4,18,18,19,19,19,19,18,18,18,17,17,17,18,17,17,16,16,16,16,16,15,15,16,17,19,21,21,20,19,17,14,12,12,15,6,12,11,15,6,1,0,0,9,13,14,13,10,5,6,6,8,15,15,15,15,14,12,8,3,2},
{23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,23,24,23,23,24,23,23,23,23,18,18,18,16,12,17,18,19,19,20,20,21,20,21,21,21,20,20,20,20,20,20,20,19,18,18,18,18,20,20,20,18,17,16,15,15,15,15,15,16,15,15,15,13,11,13,13,11,9,9,9,13,13,12,12,14,15,14,5,2,2,2,2,2},
{23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,23,23,23,24,23,25,19,18,18,15,17,18,18,19,20,20,21,21,21,21,21,21,21,21,20,18,17,18,18,20,20,20,20,19,17,16,15,14,16,17,18,19,19,18,18,18,17,18,17,16,16,16,16,16,16,16,15,16,6,3,3,5,6,23,23,23,23},
{2,11,15,18,23,23,23,23,23,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,17,19,15,16,17,18,18,19,20,20,20,21,20,20,20,19,19,18,14,12,9,16,16,17,16,15,14,14,15,16,15,18,19,20,19,19,19,19,19,19,18,18,17,17,16,16,16,16,7,12,14,14,16,25,23,23,23,23,23},
{16,5,5,13,14,15,24,22,22,23,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,16,16,17,17,18,19,19,19,19,18,17,18,17,17,16,16,17,17,15,15,16,14,14,15,16,17,18,18,19,19,18,19,18,17,17,17,16,15,15,15,14,11,12,15,15,24,22,22,22,22,23,23,23,23,23},
{16,16,16,15,10,11,14,15,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,15,16,16,17,17,18,18,17,15,11,6,11,11,12,13,14,15,15,15,15,16,17,15,15,14,15,15,16,17,17,16,16,15,15,15,14,14,11,15,15,23,22,22,22,22,22,22,23,22,22,23,23,23,23},
{17,18,17,16,15,15,11,15,15,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,10,15,16,16,16,16,17,18,18,18,17,16,16,17,16,16,16,16,15,14,14,14,15,14,15,15,15,15,15,14,14,14,12,21,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23},
{19,19,18,17,16,15,15,14,24,22,22,22,22,22,22,22,22,22,22,23,22,23,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,16,15,14,15,15,15,16,16,17,17,18,18,17,16,16,16,16,16,15,15,15,14,14,14,14,14,14,14,11,22,21,21,21,22,22,22,22,22,22,22,22,22,22,23,22,23,23,23,23,23,23},
{19,19,19,18,17,16,16,15,14,12,21,22,21,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,19,13,17,17,17,16,14,12,13,13,15,15,16,16,16,17,16,16,16,15,13,12,12,12,12,12,12,13,15,21,21,22,21,21,21,22,22,22,22,22,22,22,22,23,22,23,23,23,23,23,23,23,23},
{18,19,19,18,17,16,15,15,14,14,13,21,22,22,21,21,22,22,22,22,22,22,22,22,22,23,23,22,23,22,23,23,22,22,23,23,23,24,17,17,18,18,17,17,16,15,13,10,10,10,11,11,12,12,12,11,9,9,10,10,12,13,14,15,15,21,21,21,21,21,21,22,22,22,22,22,22,23,23,22,23,23,23,23,23,23,23,23,23,23},
{16,16,15,15,14,15,15,15,15,14,13,24,21,21,21,21,21,21,22,22,22,23,22,22,22,22,22,23,22,22,22,22,23,23,23,24,23,23,24,18,18,18,18,18,18,17,16,16,15,15,15,14,13,12,12,13,12,13,14,15,15,15,15,15,13,22,21,21,21,21,21,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23},
{16,17,13,2,13,16,15,14,13,13,12,14,15,21,21,21,21,21,21,22,21,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,24,24,24,23,24,16,17,18,18,18,18,17,16,16,16,16,15,15,15,15,15,16,16,16,16,16,15,15,22,22,22,22,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23}
  

};


byte col = 0;
byte leds[24];

int angle = 0;

int passCount = 0;

int pins[12]= {
  -1, 10,9,8,7,6,5,4,2,3,12,11};
int cols[8] = {10,9,8,7,6,5,4,3};
int rows[3] = {2,12,11};


void setup() {
  
 // Serial.begin(38400);

  // sets the pins as output
  for (int i = 1; i <= 12; i++) {
    pinMode(pins[i], OUTPUT);
  }


  // set up cols and rows
  for (int i = 1; i <= 8; i++) {
    digitalWrite(cols[i - 1], LOW);
  }

  for (int i = 1; i <= 8; i++) {
    digitalWrite(rows[i - 1], LOW);
  }

  // Turn off toggling of pin 11
  FrequencyTimer2::disable();
  // Set refresh rate (interrupt timeout period)
  FrequencyTimer2::setPeriod(2000);
  // Set interrupt routine to be called
  FrequencyTimer2::setOnOverflow(display);

  setPattern();
}


void setPattern() {
  for (int j = 0; j < 24; j++) {
    leds[j] = image[j][angle];  
    //Serial.println(leds[j],DEC);

  }

 // Serial.print("angle : ");
 // Serial.println(angle);
  //Serial.print("passCount : ");
 // Serial.println(passCount);


}

void loop() {

  angle++;
  if(angle == ANGLES){
    angle = 0;
    passCount++;
    if(passCount==PASSES){
     passCount = -1; 
    }
  }
  setPattern();
  delay(250); 


}


void display() {

  digitalWrite(cols[col], LOW);  // Turn whole previous column off
  col++;
  if (col == 8) {
    col = 0;
  }

  if(leds[col]==passCount){
    digitalWrite(rows[0], LOW); 
  }
  else{
    digitalWrite( rows[0], HIGH);
  }

  if(leds[col+8]== passCount){
    digitalWrite(rows[1], LOW);  
   // Serial.println(col+8);
  } 
  else{
    digitalWrite( rows[1], HIGH);
  }

  if(leds[col+16]== passCount){
    digitalWrite(rows[2], LOW);  
  } 
  else{
    digitalWrite( rows[2], HIGH);
  }

  digitalWrite(cols[col], HIGH); // Turn whole column on at once (for equal lighting times)
}

The rapid flashing is likely your microprocessor constantly resetting itself.

I am dealing with a two dimensional array with a lot of values. 24*90 byte values.

24*90 = 2160. The Uno only has 2048 bytes of RAM....

If the array never changes, move it into PROGMEM:
http://www.arduino.cc/en/Reference/PROGMEM

harveymoon:
I had read that it could be possible that an improperly created array or one that is too large, could overwrite the bootloader.

You can't overwrite the boot loader. It is in protected memory. Is this a Uno Rev3, or what? What operating system are you using to upload sketches?

The rapid flashing is likely your microprocessor constantly resetting itself.

Agreed.

Your array image[] will not fit in memory. You can place it in PROGMEM, where it will fit fine.
Have a look at this writeup that pretty well matches what it looks like you're trying to do:
http://www.nongnu.org/avr-libc/user-manual/pgmspace.html

OK COOL
so I looked into PROGMEM and this is what I came up with

can someone tell me if this is OK? Or am I completely off track?

#include <FrequencyTimer2.h>
#include <avr/pgmspace.h>


#define ANGLES 90
#define PASSES 25

PROGMEM prog_int16_t image[][ANGLES] = 
{



{0,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23},
{0,22,22,22,23,23,24,23,23,23,23,24,24,24,24,24,24,24,23,23,23,24,23,23,23,23,24,24,24,24,24,24,24,24,23,23,23,23,23,23,23,23,23,23,23,24,24,23,23,24,24,23,23,23,23,23,23,23,23,24,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,23,23,23,23,23,23,23,23,23,23},
{0,23,24,24,24,23,23,23,23,23,23,24,24,23,23,24,23,23,23,23,23,23,23,23,23,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,23,23,23,23,23,23,23,23,23,21,20,17,14,14,11,10,5,4,3,3,3,3,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2},
{0,22,23,23,23,24,23,23,23,23,23,23,23,23,23,24,23,23,24,24,23,23,23,23,23,23,24,23,23,23,23,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,23,22,20,16,11,9,6,5,5,2,2,2,2,2,2,1,2,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
{0,23,23,23,23,23,23,23,23,23,23,24,24,23,23,23,23,24,23,24,23,24,23,23,24,23,23,23,24,24,24,24,23,23,23,24,24,23,23,24,23,24,24,24,24,23,23,23,22,20,13,9,3,3,3,3,2,2,2,2,1,2,1,1,2,2,1,2,1,1,1,1,1,1,1,2,1,1,2,2,2,2,2,1,2,2,2,3,2,2},
{0,24,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,23,23,24,24,24,24,24,24,24,24,24,24,24,23,23,23,23,23,23,24,23,23,23,23,20,11,4,4,3,2,2,3,2,2,2,1,1,1,1,2,2,2,2,3,2,2,3,4,6,8,9,10,11,13,14,15,15,16,16,16,17,17,17,17},
{0,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,23,24,23,23,24,23,24,24,23,23,24,24,23,23,24,23,23,24,24,23,24,24,24,24,23,24,23,23,24,23,24,23,23,22,23,17,10,4,3,3,2,3,2,2,2,2,2,3,2,3,4,5,7,10,13,15,16,17,17,18,18,19,19,19,20,20,20,20,20,20,20,21,21},
{0,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,23,23,24,24,23,24,24,24,24,24,24,23,24,24,23,24,23,24,23,24,23,24,24,23,24,24,24,24,23,24,24,24,20,13,4,4,3,2,2,2,2,3,3,2,4,5,7,10,14,15,17,17,18,19,19,19,19,20,20,20,20,20,21,20,21,21,21,21},
{0,23,23,24,23,24,23,24,24,23,23,23,24,24,24,24,23,23,24,24,24,23,24,23,23,23,23,24,23,24,23,24,24,24,23,23,23,24,24,23,23,24,23,23,24,24,24,24,23,24,24,23,24,24,24,24,23,24,14,5,5,2,2,2,2,3,2,4,5,6,9,13,16,17,17,18,19,19,19,19,19,20,20,20,20,21,21,21,21,21},
{0,24,23,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,24,23,24,24,24,24,24,24,24,24,23,23,24,23,24,23,24,24,23,24,24,23,24,24,23,24,23,24,24,23,24,24,24,23,24,24,24,24,24,23,23,23,16,5,3,3,2,2,3,3,4,7,12,15,16,17,17,19,19,19,19,20,19,20,20,20,20,21,21,21},
{0,24,24,24,24,24,24,23,24,24,24,23,24,24,23,24,24,24,24,24,23,23,24,24,24,24,24,24,23,24,23,23,24,24,23,24,23,24,23,23,23,23,24,23,23,24,24,23,24,23,24,24,24,24,23,24,24,23,23,24,24,23,24,24,24,23,12,1,2,2,2,2,5,15,16,16,16,16,10,9,9,8,8,8,7,5,5,4,4,4},
{0,24,24,24,24,24,24,24,23,24,24,24,24,24,23,24,24,24,24,24,24,24,24,24,23,24,24,23,24,24,23,24,23,23,23,23,23,23,23,23,23,23,23,23,23,24,23,23,23,23,23,24,24,24,24,23,24,23,24,23,23,24,24,24,23,24,24,23,23,14,3,2,2,3,16,17,16,16,15,16,15,13,8,10,0,10,6,2,2,6},
{0,24,23,24,24,24,24,24,24,24,23,24,23,21,21,13,4,4,3,2,2,2,2,2,2,2,3,2,2,2,3,3,4,5,14,20,22,23,24,23,24,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,23,24,23,23,24,15,16,15,14,10,4,18,18,19,19,19,19,18,18,18,17,17,17,18,17,17},
{0,24,24,23,24,24,23,24,22,9,2,2,2,2,2,2,2,1,1,1,1,1,1,2,2,3,2,3,2,2,2,2,1,2,2,2,2,2,2,9,20,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,23,24,23,23,24,23,23,23,23,18,18,18,16,12,17,18,19,19,20,20,21,20,21,21,21,20,20,20},
{0,23,24,24,23,21,6,3,2,1,1,1,1,1,1,1,1,2,3,4,8,12,13,15,15,16,16,16,15,15,15,14,13,13,11,8,5,2,2,2,2,2,2,14,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,23,23,23,24,23,25,19,18,18,15,17,18,18,19,20,20,21,21,21,21,21,21},
{0,24,23,23,9,2,2,1,1,1,1,1,1,0,2,2,3,4,9,15,17,18,18,18,18,18,18,18,17,17,17,17,16,16,15,15,15,15,15,14,13,9,1,2,2,2,11,15,18,23,23,23,23,23,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,17,19,15,16,17,18,18,19,20,20,20,21,20,20},
{0,23,22,8,2,1,1,0,0,0,1,1,1,1,2,3,7,12,18,19,19,20,20,20,20,20,20,19,19,19,19,19,18,17,17,17,15,10,8,6,8,9,13,15,15,16,5,5,13,14,15,24,22,22,23,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,16,16,17,17,18,19,19,19,19,18},
{0,23,23,7,2,1,1,1,1,1,1,1,1,2,3,6,12,18,20,21,21,21,21,21,21,21,21,21,21,21,21,20,19,18,14,6,3,9,14,13,2,7,10,13,15,16,16,16,15,10,11,14,15,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,15,16,16,17,17,18,18,17,15},
{0,23,23,7,2,1,1,1,1,1,1,1,2,4,6,11,17,20,21,21,22,22,22,22,22,22,21,21,21,22,21,21,18,10,5,8,3,0,1,2,15,12,15,16,16,17,18,17,16,15,15,11,15,15,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,10,15,16,16,16,16,17},
{0,23,23,20,2,1,1,1,1,1,1,1,2,6,12,18,20,21,21,22,22,22,22,22,22,22,22,22,22,22,21,20,16,13,10,9,7,10,15,15,16,17,18,18,19,19,19,18,17,16,15,15,14,24,22,22,22,22,22,22,22,22,22,22,23,22,23,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,16,15,14,15,15,15},
{0,24,23,23,19,1,3,2,1,1,1,2,3,9,16,20,20,21,21,21,22,22,22,22,22,22,22,22,21,20,20,20,20,20,19,15,14,14,15,16,17,18,19,19,19,19,19,19,18,17,16,16,15,14,12,21,22,21,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,19,13,17,17,17,16,14,12},
{0,23,23,23,23,23,5,2,2,1,1,2,3,8,16,19,20,20,21,21,21,21,21,21,22,22,20,16,10,9,12,13,15,17,20,21,20,19,17,16,15,14,14,12,17,18,19,19,18,17,16,15,15,14,14,13,21,22,22,21,21,22,22,22,22,22,22,22,22,22,23,23,22,23,22,23,23,22,22,23,23,23,24,17,17,18,18,17,17,16},
{0,24,24,24,24,23,23,22,5,3,2,2,1,2,6,15,18,19,19,20,20,20,20,21,20,17,7,4,13,5,19,13,15,15,18,18,17,19,20,21,21,18,15,11,14,16,16,15,15,14,15,15,15,15,14,13,24,21,21,21,21,21,21,22,22,22,23,22,22,22,22,22,23,22,22,22,22,23,23,23,24,23,23,24,18,18,18,18,18,18},
{0,23,23,24,23,23,23,23,23,23,15,3,2,2,2,3,5,9,15,16,17,18,19,19,16,9,13,16,0,1,15,17,18,19,20,20,19,16,19,18,18,13,14,16,16,16,17,13,2,13,16,15,14,13,13,12,14,15,21,21,21,21,21,21,22,21,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,24,24,24,23,24,16,17,18,18}


};


byte col = 0;
byte leds[24];

int angle = 0;

int passCount = 0;

int pins[12]= {
  -1, 10,9,8,7,6,5,4,2,3,12,11};
int cols[8] = {10,9,8,7,6,5,4,3};
int rows[3] = {2,12,11};


void setup() {
  
 Serial.begin(57600);
  Serial.println("OHAI!");
  // sets the pins as output
  for (int i = 1; i <= 12; i++) {
    pinMode(pins[i], OUTPUT);
  }


  // set up cols and rows
  for (int i = 1; i <= 8; i++) {
    digitalWrite(cols[i - 1], LOW);
  }

  for (int i = 1; i <= 8; i++) {
    digitalWrite(rows[i - 1], LOW);
  }

  // Turn off toggling of pin 11
  FrequencyTimer2::disable();
  // Set refresh rate (interrupt timeout period)
  FrequencyTimer2::setPeriod(2000);
  // Set interrupt routine to be called
  FrequencyTimer2::setOnOverflow(display);

  setPattern();
}


void setPattern() {
  Serial.println("Hit setPattern()");
  for (int j = 0; j < 24; j++) {
    int me = pgm_read_byte_near(&image[j][angle]);
    Serial.println(me);
    //leds[j] = pgm_read_byte_near(image[j][angle]);  
  }

 // Serial.print("angle : ");
 // Serial.println(angle);
  //Serial.print("passCount : ");
 // Serial.println(passCount);


}

void loop() {

  angle++;
  if(angle == ANGLES){
    angle = 0;
    passCount++;
    if(passCount==PASSES){
     passCount = -1; 
    }
  }
  setPattern();
  delay(250); 


}


void display() {

  digitalWrite(cols[col], LOW);  // Turn whole previous column off
  col++;
  if (col == 8) {
    col = 0;
  }

  if(leds[col]==passCount){
    digitalWrite(rows[0], LOW); 
  }
  else{
    digitalWrite( rows[0], HIGH);
  }

  if(leds[col+8]== passCount){
    digitalWrite(rows[1], LOW);  
   // Serial.println(col+8);
  } 
  else{
    digitalWrite( rows[1], HIGH);
  }

  if(leds[col+16]== passCount){
    digitalWrite(rows[2], LOW);  
  } 
  else{
    digitalWrite( rows[2], HIGH);
  }

  digitalWrite(cols[col], HIGH); // Turn whole column on at once (for equal lighting times)
}

Disconnecte everything from the Arduino, let it cool off for 20 min then reconnect the usb cable and attempt a program. If you have been driving loads of leds off the board 5V the regulator will be hot enough to be reducing output voltages in an effort to control die temps. (the Motor3 board draws enough for the HBridge logic to do this after a few hours running)

harveymoon:
OK COOL
so I looked into PROGMEM and this is what I came up with

can someone tell me if this is OK? Or am I completely off track?

//...

That looks good at a glance, but you might want to make the array prog_uint8_t since all the values are between 0 and 255.

If you want to prove that the board is OK I suggest you double-check that you have the correct board type and serial port selected and then upload the standard blink example.

harveymoon:
can someone tell me if this is OK? Or am I completely off track?

PROGMEM prog_int16_t image[][ANGLES] = 

:
        :

int me = pgm_read_byte_near(&image[j][angle]);

In your original code I think image[] was bytes. Here you've made it int16_t. Then later you're reading it as a byte. I think what you want is more like:

PROGMEM prog_uint8_t image[][ANGLES] = = { .... };

Also, it would be wise to check whether "int me = pgm_read_byte_near()" might do a sign extension on the byte being read. I think you might want that to be:

   int me = (uint8_t) pgm_read_byte_near(&image[j][angle]);