compiling hangs

I have been working on a program to help me understand the different ways to display messages and animations and images on an 8x8 led matrix using the Arduino and a max7219 IC. I have a program that shows a few and works well but when I try to put a scrolling text loop into the program it hangs up while compiling and I cant seem to get past that. Would anyone know why this happens?? I posted the code and have commented out the offending code section so it will work. I also included a snip of the hang.
Thanks in advance
Rick

loop_led_matrix_test2.ino (5.5 KB)

#define A {31, 36, 68, 36, 31}
#define B {127, 73, 73, 73, 54,}
#define C {62, 65, 65, 65, 34}
#define D {127, 65, 65, 34, 28}
#define E {127, 73, 73, 65, 65}
#define F {127, 72, 72, 72, 64}
#define G {62, 65, 65, 69, 38}
#define H {127, 8, 8, 8, 127}
#define I {0, 65, 127, 65, 0}
#define J {2, 1, 1, 1, 126}
#define K {127, 8, 20, 34, 65}
#define L {127, 1, 1, 1, 1}
#define M {127, 32, 16, 32, 127}
#define N {127, 32, 16, 8, 127}
#define O {62, 65, 65, 65, 62}
#define P {127, 72, 72, 72, 48}
#define Q {62, 65, 69, 66, 61}
#define R {127, 72, 76, 74, 49}
#define S {50, 73, 73, 73, 38}
#define T {64, 64, 127, 64, 64}
#define U {126, 1, 1, 1, 126}
#define V {124, 2, 1, 2, 124}
#define W {126, 1, 6, 1, 126}
#define X {99, 20, 8, 20, 99}
#define Y {96, 16, 15, 16, 96}
#define Z {67, 69, 73, 81, 97}

One letter names are a REALLY bad idea. Did i mention that one letters names are a really, really bad idea?

F() is defined as a macro, already.

int y = sizeof(x)/6;              // must match message length

A 6 x 6 array of bytes uses 36 bytes. Dividing that by 6 hardly requires an int variable to hold the result.

  byte N[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};
  byte three[8]={B00000000,B00011000,B00100100,B00000100,B00011000,B00000100,B00100100,B00011000};
  byte K[8]={B00000000,B11001100,B01001000,B01010000,B01100000,B01010000,B01001000,B11001100};
  byte C[8]={B00000000,B00111100,B01100100,B01000000,B01000000,B01000000,B01100100,B00111100};
  byte A[8]={B00000000,B00010000,B00111000,B01101100,B01000100,B01111100,B01000100,B01000100};

What the hell is this? You’ve already used those names.

What is

"ADD AS MANY VOIDS AS YOU LIKE HERE" supposed to mean ?

michinyon:
What is

"ADD AS MANY VOIDS AS YOU LIKE HERE" supposed to mean ?

Functions. They are called functions. Did I say, they're called functions? :slight_smile:

#define B {127, 73, 73, 73, 54,}

Pls get rid of that dangling comma. Some languages are forgiving about syntax - C++ isn't one of them.

well I usually appreciate help and I am definitely not trying to discourage anyone from making an honest effort to to so ... however each one of you that responded missed the point of the question as to why it will not compile. I would venture to guess that none of you tried it.
and...

single letter names where used to replace a Spanish words that I wasn't sure about and will be replaced.

extra comma fixed but not a real issue.

redefining some letters in binary from another program was an over site but also was not the cause for the non compiling hang.

yes i meant functions not voids but also off topic.

i don't see the F() is defined as a macro, already. mistake can you elaborate?

the comment "what the hell is this?" really ??? are you that upset ? I am just asking for help...

I figured the forum was to help. It has been my experience that if you don't know the answer its best not to.

with respect
Rick

It looks to me like you've received quite a bit of valuable help -- people pointing out some of the many difficulties with the code. Yes, F() is a predefined macro.

I compiled your sketch and the compiler does not hang. Instead, it produces a LONG list of error messages.

PaulMurrayCbr:

#define B {127, 73, 73, 73, 54,}

Pls get rid of that dangling comma. Some languages are forgiving about syntax - C++ isn’t one of them.

It is in this case.

Rick_Green:
I would venture to guess that none of you tried it.

I did.

I know for a fact you did not.

jremington:
It looks to me like you’ve received quite a bit of valuable help – people pointing out some of the many difficulties with the code. Yes, F() is a predefined macro.

I compiled your sketch and the compiler does not hang. Instead, it produces a LONG list of error messages.

valuable help? I disagree… I am just trying to learn some code and fix a problem regarding my arduino compiler. if you don’t know that is cool but like I said before no answer is the right answer if you don’t know…

I suggest you don’t use the bleeding-edge IDE 1.6.4. Try 1.0.6, which is the one I usually use, and which did not hang.

Let’s look at your code shall we? For me it fails at line 122:

sketch_may20c.ino: In function ‘void Matrix()’:
sketch_may20c:122: error: expected unqualified-id before ‘{’ token
sketch_may20c:122: error: expected primary-expression before ‘[’ token

That is:

void Matrix() {
    
  /* DISPLAY OUTPUT DATA */  
  byte on[8]={B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111};
  byte N[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};   // <-- line 122

Now let’s look at what N is:

#define N {127, 32, 16, 8, 127}

Substituting N in the offending line we get:

  byte {127, 32, 16, 8, 127}[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};   // <-- line 122

Doesn’t make sense to me.

PaulS:
One letter names are a REALLY bad idea. Did i mention that one letters names are a really, really bad idea?

F() is defined as a macro, already.

What the hell is this? You’ve already used those names.

PaulS was right on a number of points. Why ignore him?

Rick_Green:
valuable help? I disagree… I am just trying to learn some code and fix a problem regarding my arduino compiler. if you don’t know that is cool but like I said before no answer is the right answer if you don’t know…

Is there something in the air this week? We do know, you are ignoring our correct replies.

Next thing we know you’ll be complaining about how unfriendly the forum is. Oh wait, you already have complained.

however each one of you that responded missed the point of the question as to why it will not compile. I would venture to guess that none of you tried it.

Nope. You missed the point of the answers.

christop:
It is in this case.

This compiles OK:

#define B complete nonsense ( , ; - ^%$ 42 is the meaning of life //
void setup () { }
void loop () { }

However I would be careful about using "B" later in the code.

For example:

void setup () { 
  B = 5; 
  }

Gives:

sketch_may20d:4: error: stray ‘$’ in program
sketch_may20d.ino: In function ‘void setup()’:
sketch_may20d:4: error: ‘complete’ was not declared in this scope
sketch_may20d:4: error: expected `;' before ‘nonsense’
sketch_may20d:4: error: expected primary-expression before ‘^’ token
sketch_may20d:4: error: expected primary-expression before ‘%’ token
sketch_may20d:4: error: expected `;' before ‘is’

So you can't really say that a #define "compiles". It is merely a text-substitution mechanism for the compiler.

  byte smiley[8]={B00000000,B01100110,B01100110,B00000000,B00000000,B01100110,B00111100,B00000000};
  byte antismiley[8]={B11111111,B10011001,B10011001,B11111111,B11111111,B10011001,B11000011,B11111111};

{ facepalm }

Oh, I was referring only to the dangling comma in a brace-delimited list, such as this:

int x[] = { 1, 2, 3, };

That is allowed in C and C++.

the code does compile without the scroll function here it is below. the first one at the beginning of my post does not compile with the scroll function. YES the forum does seem a tad unfriendly Nick.

thanks for all the help anyway. i guess i just dont understand this stuff yet. i am trying to learn C and embedded uC’s but is hard for me. i dont have a tutor I am using you tube, my C programming book and the elliot williams avr book. I wish I could start over because i feel like i got off on the wrong foot and need some help.
sincerely
Rick

loop_led_matrix_test.ino (4.01 KB)

Perhaps they’d be more friendly if you simply posted the code, instead of forcing people to download it.

#include "LedControl.h"
LedControl lc=LedControl(12,11,10,4);  //pin 12 DATA IN, pin 11 CLK, pin 10 LOAD, 1 max7219 IC
int dela=100; //delay a
int delb=1000; //delay b
int delc=300; //delay c
int deld=50; //delay d
int x=1;

void setup() {
  
  lc.shutdown(0,false);  
  lc.setIntensity(0,2);      /* Set the brightness 0-15 */  
  lc.clearDisplay(0);        /* and clear the display */
}

void Smiley() {
  
  /* DISPLAY OUTPUT DATA */
  byte smiley[8]={B00000000,B01100110,B01100110,B00000000,B00000000,B01100110,B00111100,B00000000};
  byte antismiley[8]={B11111111,B10011001,B10011001,B11111111,B11111111,B10011001,B11000011,B11111111};
  
  for ( x=1; x<=10; x++)
  {
  lc.setRow(0,0,smiley[0]);
  lc.setRow(0,1,smiley[1]);
  lc.setRow(0,2,smiley[2]);
  lc.setRow(0,3,smiley[3]);
  lc.setRow(0,4,smiley[4]);
  lc.setRow(0,5,smiley[5]);
  lc.setRow(0,6,smiley[6]);
  lc.setRow(0,7,smiley[7]);
  delay(dela);
  
  lc.setRow(0,0,antismiley[0]);
  lc.setRow(0,1,antismiley[1]);
  lc.setRow(0,2,antismiley[2]);
  lc.setRow(0,3,antismiley[3]);
  lc.setRow(0,4,antismiley[4]);
  lc.setRow(0,5,antismiley[5]);
  lc.setRow(0,6,antismiley[6]);
  lc.setRow(0,7,antismiley[7]);
  delay(dela);
  }
  
  lc.setRow(0,0,0); 
  lc.setRow(0,1,0);
  lc.setRow(0,2,0);
  lc.setRow(0,3,0);
  lc.setRow(0,4,0);
  lc.setRow(0,5,0);
  lc.setRow(0,6,0);
  lc.setRow(0,7,0);
  delay(delb);
}

void Matrix() {
  
  
  /* DISPLAY OUTPUT DATA */  
  byte on[8]={B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111};
  byte N[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};
  byte three[8]={B00000000,B00011000,B00100100,B00000100,B00011000,B00000100,B00100100,B00011000};
  byte K[8]={B00000000,B11001100,B01001000,B01010000,B01100000,B01010000,B01001000,B11001100};
  byte C[8]={B00000000,B00111100,B01100100,B01000000,B01000000,B01000000,B01100100,B00111100};
  byte A[8]={B00000000,B00010000,B00111000,B01101100,B01000100,B01111100,B01000100,B01000100};
       
  lc.setRow(0,0,N[0]);
  lc.setRow(0,1,N[1]);
  lc.setRow(0,2,N[2]);
  lc.setRow(0,3,N[3]);
  lc.setRow(0,4,N[4]);
  lc.setRow(0,5,N[5]);
  lc.setRow(0,6,N[6]);
  lc.setRow(0,7,N[7]);
  delay(delc);
  
  lc.setRow(0,0,three[0]);
  lc.setRow(0,1,three[1]);
  lc.setRow(0,2,three[2]);
  lc.setRow(0,3,three[3]);
  lc.setRow(0,4,three[4]);
  lc.setRow(0,5,three[5]);
  lc.setRow(0,6,three[6]);
  lc.setRow(0,7,three[7]);
  delay(delc);
  
  lc.setRow(0,0,K[0]);
  lc.setRow(0,1,K[1]);
  lc.setRow(0,2,K[2]);
  lc.setRow(0,3,K[3]);
  lc.setRow(0,4,K[4]);
  lc.setRow(0,5,K[5]);
  lc.setRow(0,6,K[6]);
  lc.setRow(0,7,K[7]);
  delay(delc);
  
  lc.setRow(0,0,C[0]);
  lc.setRow(0,1,C[1]);
  lc.setRow(0,2,C[2]);
  lc.setRow(0,3,C[3]);
  lc.setRow(0,4,C[4]);
  lc.setRow(0,5,C[5]);
  lc.setRow(0,6,C[6]);
  lc.setRow(0,7,C[7]);
  delay(delc);
  
  lc.setRow(0,0,A[0]);
  lc.setRow(0,1,A[1]);
  lc.setRow(0,2,A[2]);
  lc.setRow(0,3,A[3]);
  lc.setRow(0,4,A[4]);
  lc.setRow(0,5,A[5]);
  lc.setRow(0,6,A[6]);
  lc.setRow(0,7,A[7]);
  delay(delc);
  
  lc.setRow(0,0,0);
  lc.setRow(0,1,0);
  lc.setRow(0,2,0);
  lc.setRow(0,3,0);
  lc.setRow(0,4,0);
  lc.setRow(0,5,0);
  lc.setRow(0,6,0);
  lc.setRow(0,7,0);
  delay(delb);
}

  void Animation(){
  for ( x=1; x<=6; x++)
  {
  lc.setColumn(0,0,B00010010);  //alien
  lc.setColumn(0,1,B00110100);
  lc.setColumn(0,2,B01101010);
  lc.setColumn(0,3,B01110100);
  lc.setColumn(0,4,B01110100);
  lc.setColumn(0,5,B01101010);
  lc.setColumn(0,6,B00110100);
  lc.setColumn(0,7,B00010010);
  delay(200);
  
  lc.setColumn(0,0,B00010000);  //alien
  lc.setColumn(0,1,B00110110);
  lc.setColumn(0,2,B01011000);
  lc.setColumn(0,3,B01110100);
  lc.setColumn(0,4,B01110100);
  lc.setColumn(0,5,B01011000);
  lc.setColumn(0,6,B00110110);
  lc.setColumn(0,7,B00010000);
  delay(200);
  
   for(int col=3;col<5;col++) {
      lc.setLed(0,0,col,true);
      delay(50);
      for(int i=0;i<col;i++) {
        lc.setLed(0,0,col,false);
        }
    }
  }
}

void loop() { 
  
  Smiley();
  Matrix();      // ADD AS MANY VOIDS AS YOU LIKE HERE
  Animation();
  Matrix();
 }

this one compiles and runs on my arduino uno

#include “LedControl.h”
LedControl lc=LedControl(12,11,10,4); //pin 12 DATA IN, pin 11 CLK, pin 10 LOAD, 1 max7219 IC
int dela=100; //delay a
int delb=1000; //delay b
int delc=300; //delay c
int deld=50; //delay d
int x=1;

void setup() {

lc.shutdown(0,false);
lc.setIntensity(0,2); /* Set the brightness 0-15 /
lc.clearDisplay(0); /
and clear the display */
}

void Smiley() {

/* DISPLAY OUTPUT DATA */
byte smiley[8]={B00000000,B01100110,B01100110,B00000000,B00000000,B01100110,B00111100,B00000000};
byte antismiley[8]={B11111111,B10011001,B10011001,B11111111,B11111111,B10011001,B11000011,B11111111};

for ( x=1; x<=10; x++)
{
lc.setRow(0,0,smiley[0]);
lc.setRow(0,1,smiley[1]);
lc.setRow(0,2,smiley[2]);
lc.setRow(0,3,smiley[3]);
lc.setRow(0,4,smiley[4]);
lc.setRow(0,5,smiley[5]);
lc.setRow(0,6,smiley[6]);
lc.setRow(0,7,smiley[7]);
delay(dela);

lc.setRow(0,0,antismiley[0]);
lc.setRow(0,1,antismiley[1]);
lc.setRow(0,2,antismiley[2]);
lc.setRow(0,3,antismiley[3]);
lc.setRow(0,4,antismiley[4]);
lc.setRow(0,5,antismiley[5]);
lc.setRow(0,6,antismiley[6]);
lc.setRow(0,7,antismiley[7]);
delay(dela);
}

lc.setRow(0,0,0);
lc.setRow(0,1,0);
lc.setRow(0,2,0);
lc.setRow(0,3,0);
lc.setRow(0,4,0);
lc.setRow(0,5,0);
lc.setRow(0,6,0);
lc.setRow(0,7,0);
delay(delb);
}

void Matrix() {

/* DISPLAY OUTPUT DATA */
byte on[8]={B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111};
byte N[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};
byte three[8]={B00000000,B00011000,B00100100,B00000100,B00011000,B00000100,B00100100,B00011000};
byte K[8]={B00000000,B11001100,B01001000,B01010000,B01100000,B01010000,B01001000,B11001100};
byte C[8]={B00000000,B00111100,B01100100,B01000000,B01000000,B01000000,B01100100,B00111100};
byte A[8]={B00000000,B00010000,B00111000,B01101100,B01000100,B01111100,B01000100,B01000100};

lc.setRow(0,0,N[0]);
lc.setRow(0,1,N[1]);
lc.setRow(0,2,N[2]);
lc.setRow(0,3,N[3]);
lc.setRow(0,4,N[4]);
lc.setRow(0,5,N[5]);
lc.setRow(0,6,N[6]);
lc.setRow(0,7,N[7]);
delay(delc);

lc.setRow(0,0,three[0]);
lc.setRow(0,1,three[1]);
lc.setRow(0,2,three[2]);
lc.setRow(0,3,three[3]);
lc.setRow(0,4,three[4]);
lc.setRow(0,5,three[5]);
lc.setRow(0,6,three[6]);
lc.setRow(0,7,three[7]);
delay(delc);

lc.setRow(0,0,K[0]);
lc.setRow(0,1,K[1]);
lc.setRow(0,2,K[2]);
lc.setRow(0,3,K[3]);
lc.setRow(0,4,K[4]);
lc.setRow(0,5,K[5]);
lc.setRow(0,6,K[6]);
lc.setRow(0,7,K[7]);
delay(delc);

lc.setRow(0,0,C[0]);
lc.setRow(0,1,C[1]);
lc.setRow(0,2,C[2]);
lc.setRow(0,3,C[3]);
lc.setRow(0,4,C[4]);
lc.setRow(0,5,C[5]);
lc.setRow(0,6,C[6]);
lc.setRow(0,7,C[7]);
delay(delc);

lc.setRow(0,0,A[0]);
lc.setRow(0,1,A[1]);
lc.setRow(0,2,A[2]);
lc.setRow(0,3,A[3]);
lc.setRow(0,4,A[4]);
lc.setRow(0,5,A[5]);
lc.setRow(0,6,A[6]);
lc.setRow(0,7,A[7]);
delay(delc);

lc.setRow(0,0,0);
lc.setRow(0,1,0);
lc.setRow(0,2,0);
lc.setRow(0,3,0);
lc.setRow(0,4,0);
lc.setRow(0,5,0);
lc.setRow(0,6,0);
lc.setRow(0,7,0);
delay(delb);
}

void Animation(){
for ( x=1; x<=6; x++)
{
lc.setColumn(0,0,B00010010); //alien
lc.setColumn(0,1,B00110100);
lc.setColumn(0,2,B01101010);
lc.setColumn(0,3,B01110100);
lc.setColumn(0,4,B01110100);
lc.setColumn(0,5,B01101010);
lc.setColumn(0,6,B00110100);
lc.setColumn(0,7,B00010010);
delay(200);

lc.setColumn(0,0,B00010000); //alien
lc.setColumn(0,1,B00110110);
lc.setColumn(0,2,B01011000);
lc.setColumn(0,3,B01110100);
lc.setColumn(0,4,B01110100);
lc.setColumn(0,5,B01011000);
lc.setColumn(0,6,B00110110);
lc.setColumn(0,7,B00010000);
delay(200);

for(int col=3;col<5;col++) {
lc.setLed(0,0,col,true);
delay(50);
for(int i=0;i<col;i++) {
lc.setLed(0,0,col,false);
}
}
}
}

void loop() {

Smiley();
Matrix();
Animation();
Matrix();
}

this version just hangs

#include “LedControl.h”
#include <stddef.h>;

LedControl lc=LedControl(12,11,10,1); //pin 12 DATA IN, pin 11 CLK, pin 10 LOAD, 1 max7219 IC

int dela=100; //delay a
int delb=1000; //delay b
int delc=300; //delay c
int x=1;

void setup() {
//The MAX72XX is in power-saving mode on startup, we have to do a wakeup call
lc.shutdown(0,false);
//Set the brightness to a medium values (0~15 possible values)
lc.setIntensity(0,9);
//and clear the display
lc.clearDisplay(0);
}

void scroll(){

LedControl lc=LedControl(12,11,10,1);
#define SP {0, 0, 0, 0, 0} //space
#define EX {0, 125, 0, 0, 0} //!
#define A {31, 36, 68, 36, 31}
#define B {127, 73, 73, 73, 54}
#define C {62, 65, 65, 65, 34}
#define D {127, 65, 65, 34, 28}
#define E {127, 73, 73, 65, 65}
#define F {127, 72, 72, 72, 64}
#define G {62, 65, 65, 69, 38}
#define H {127, 8, 8, 8, 127}
#define I {0, 65, 127, 65, 0}
#define J {2, 1, 1, 1, 126}
#define K {127, 8, 20, 34, 65}
#define L {127, 1, 1, 1, 1}
#define M {127, 32, 16, 32, 127}
#define N {127, 32, 16, 8, 127}
#define O {62, 65, 65, 65, 62}
#define P {127, 72, 72, 72, 48}
#define Q {62, 65, 69, 66, 61}
#define R {127, 72, 76, 74, 49}
#define S {50, 73, 73, 73, 38}
#define T {64, 64, 127, 64, 64}
#define U {126, 1, 1, 1, 126}
#define V {124, 2, 1, 2, 124}
#define W {126, 1, 6, 1, 126}
#define X {99, 20, 8, 20, 99}
#define Y {96, 16, 15, 16, 96}
#define Z {67, 69, 73, 81, 97}

byte x[6][6]={H,E,L,L,O,SP}; // # of letters and phrase seperated by comas
int y = sizeof(x)/6; // must match message length
int z={-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12};

for (int a=0; a<y; a++){
for (int m=18; m>=5; m–) {
for (int i=0; i<5; i++){
lc.setColumn(0,z[i+m-5],x[a]);

  • }*
  • delay(30); // speed of animation*
  • lc.clearDisplay(0);*
  • }*
  • if(a == y){*
  • a = 0;*
  • }*
  • }*
    }

void Smiley() {

_ /* DISPLAY OUTPUT DATA */_

  • byte smiley[8]={B00000000,B01100110,B01100110,B00000000,B00000000,B01100110,B00111100,B00000000};*

  • byte antismiley[8]={B11111111,B10011001,B10011001,B11111111,B11111111,B10011001,B11000011,B11111111};*

  • for ( x=1; x<=10; x++)*

  • {*

  • lc.setRow(0,0,smiley[0]);*

  • lc.setRow(0,1,smiley[1]);*

  • lc.setRow(0,2,smiley[2]);*

  • lc.setRow(0,3,smiley[3]);*

  • lc.setRow(0,4,smiley[4]);*

  • lc.setRow(0,5,smiley[5]);*

  • lc.setRow(0,6,smiley[6]);*

  • lc.setRow(0,7,smiley[7]);*

  • delay(dela);*

  • lc.setRow(0,0,antismiley[0]);*

  • lc.setRow(0,1,antismiley[1]);*

  • lc.setRow(0,2,antismiley[2]);*

  • lc.setRow(0,3,antismiley[3]);*

  • lc.setRow(0,4,antismiley[4]);*

  • lc.setRow(0,5,antismiley[5]);*

  • lc.setRow(0,6,antismiley[6]);*

  • lc.setRow(0,7,antismiley[7]);*

  • delay(dela);*

  • }*

  • lc.setRow(0,0,0);*

  • lc.setRow(0,1,0);*

  • lc.setRow(0,2,0);*

  • lc.setRow(0,3,0);*

  • lc.setRow(0,4,0);*

  • lc.setRow(0,5,0);*

  • lc.setRow(0,6,0);*

  • lc.setRow(0,7,0);*

  • delay(delb);*
    }
    void Matrix() {

_ /* DISPLAY OUTPUT DATA */ _

  • //byte on[8]={B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111,B11111111};*

  • //byte N[8]={B00000000,B10001100,B11000100,B11100100,B10110100,B10011100,B10001100,B11000100};*

  • byte three[8]={B00000000,B00011000,B00100100,B00000100,B00011000,B00000100,B00100100,B00011000};*

  • //byte K[8]={B00000000,B11001100,B01001000,B01010000,B01100000,B01010000,B01001000,B11001100};*

  • //byte C[8]={B00000000,B00111100,B01100100,B01000000,B01000000,B01000000,B01100100,B00111100};*

  • //byte A[8]={B00000000,B00010000,B00111000,B01101100,B01000100,B01111100,B01000100,B01000100};*

  • lc.setRow(0,0,N[0]);*

  • lc.setRow(0,1,N[1]);*

  • lc.setRow(0,2,N[2]);*

  • lc.setRow(0,3,N[3]);*

  • lc.setRow(0,4,N[4]);*

  • lc.setRow(0,5,N[5]);*

  • lc.setRow(0,6,N[6]);*

  • lc.setRow(0,7,N[7]);*

  • delay(delc);*

  • lc.setRow(0,0,three[0]);*

  • lc.setRow(0,1,three[1]);*

  • lc.setRow(0,2,three[2]);*

  • lc.setRow(0,3,three[3]);*

  • lc.setRow(0,4,three[4]);*

  • lc.setRow(0,5,three[5]);*

  • lc.setRow(0,6,three[6]);*

  • lc.setRow(0,7,three[7]);*

  • delay(delc);*

  • lc.setRow(0,0,K[0]);*

  • lc.setRow(0,1,K[1]);*

  • lc.setRow(0,2,K[2]);*

  • lc.setRow(0,3,K[3]);*

  • lc.setRow(0,4,K[4]);*

  • lc.setRow(0,5,K[5]);*

  • lc.setRow(0,6,K[6]);*

  • lc.setRow(0,7,K[7]);*

  • delay(delc);*

  • lc.setRow(0,0,C[0]);*

  • lc.setRow(0,1,C[1]);*

  • lc.setRow(0,2,C[2]);*

  • lc.setRow(0,3,C[3]);*

  • lc.setRow(0,4,C[4]);*

  • lc.setRow(0,5,C[5]);*

  • lc.setRow(0,6,C[6]);*

  • lc.setRow(0,7,C[7]);*

  • delay(delc);*

  • lc.setRow(0,0,A[0]);*

  • lc.setRow(0,1,A[1]);*

  • lc.setRow(0,2,A[2]);*

  • lc.setRow(0,3,A[3]);*

  • lc.setRow(0,4,A[4]);*

  • lc.setRow(0,5,A[5]);*

  • lc.setRow(0,6,A[6]);*

  • lc.setRow(0,7,A[7]);*

  • delay(delc);*

  • lc.setRow(0,0,0);*

  • lc.setRow(0,1,0);*

  • lc.setRow(0,2,0);*

  • lc.setRow(0,3,0);*

  • lc.setRow(0,4,0);*

  • lc.setRow(0,5,0);*

  • lc.setRow(0,6,0);*

  • lc.setRow(0,7,0);*

  • delay(delb);*
    }

  • void Animation(){*

  • for ( x=1; x<=6; x++)*

  • {*

  • lc.setColumn(0,0,B00010010); //alien*

  • lc.setColumn(0,1,B00110100);*

  • lc.setColumn(0,2,B01101010);*

  • lc.setColumn(0,3,B01110100);*

  • lc.setColumn(0,4,B01110100);*

  • lc.setColumn(0,5,B01101010);*

  • lc.setColumn(0,6,B00110100);*

  • lc.setColumn(0,7,B00010010);*

  • delay(200);*

  • lc.setColumn(0,0,B00010000); //alien*

  • lc.setColumn(0,1,B00110110);*

  • lc.setColumn(0,2,B01011000);*

  • lc.setColumn(0,3,B01110100);*

  • lc.setColumn(0,4,B01110100);*

  • lc.setColumn(0,5,B01011000);*

  • lc.setColumn(0,6,B00110110);*

  • lc.setColumn(0,7,B00010000);*

  • delay(200);*

  • for(int col=3;col<5;col++) {*

  • lc.setLed(0,0,col,true);*

  • delay(50);*

  • for(int i=0;i<col;i++) {*

  • lc.setLed(0,0,col,false);*

  • }*

  • }*

  • }*
    }
    void loop() {

  • scroll();*

  • Smiley();*

  • Matrix(); // ADD AS MANY ‘functions’ AS YOU LIKE HERE*

  • Animation();*

  • Matrix();*

}

i hope that clarifies it ...

Since F is already a defined macro in the core, this line will hang things.

#define F {127, 72, 72, 72, 64}

There are a few others (B for instance) that have the same problem.

Single letter names are NEVER good because many of them are already defined in the core libraries.

I'm sorry if that wasn't "friendly" enough for you for some reason, but it is a really good way to hang up the compiler which is what you say your problem is.