4*4*4 led cube error

trying to program a 444 led cube and this error message comes up. i don't know what is happening.
i think i attached the program.

sketch_nov23a:10: error: 'prog_uchar' does not name a type
sketch_nov23a.ino: In function 'void loop()':
sketch_nov23a:447: error: 'PatternTable' was not declared in this scope
'prog_uchar' does not name a type

sketch_nov23a.ino (40.5 KB)

Hi,

regarding the first error, the error message is quite clear in indicating that the a has not been defined.

I have googled your error message and the following post should help you out.

Below are are few examples (from the post I provided) as to how the proper type definition when using prog_uchar .

The new Arduino 1.5.7 BETA has a few differences.
previous: prog_uchar text[] PROGMEN = { "Hello World" };
now: const unsigned char text[] PROGMEM = { "Hello World" };

Cheers
dan

the following post provides a link on how to declare variables.
Have a look at reply #4 by WillR :


There is a reference section for this idea of scoping!

It is worth the time to read and understand.

Global variables should generally be avoided.

Local variables are better.

Except for the exceptions -- but that is the advanced class.


In summary, you can either declare a global variable which any function will be able to see/use
Or you can declare the variable in the function it's being used.
Googling the error message "was not declared in this scope" should lists several entries for you to analyse and review

dan

Now I'm getting this error.

sketch_nov23a:10: error: expected initializer before 'PROGREM'
sketch_nov23a.ino: In function 'void loop()':
sketch_nov23a:447: error: 'PatternTable' was not declared in this scope
expected initializer before 'PROGREM'

PROGREM ?

That is the way it is spelled.

Kmart644:
That is the way it is spelled.

In the program, the error message or both ?

In line 10 of the program I can see

prog_uchar  PatternTable[] PROGEM = {

which looks wrong.

we have seen your ORIGINAL code but haven't seen your MODIFIED code.
Would it be possible to repost your (whole) code ?
Be sure to use the code tags...

Obviously, please a complete and exact copy of the error messages that you are getting when compiling ....

dan

Kmart644:
That is the way it is spelled.

It should be PROGMEM.

This simple typo has has several people spinning their wheels.

WOULD IT BE POSSIBLE TO CORRECT YOUR CODE (after you have corrected the PROGMEM confusion) AND REPOST YOUR CURRENT CODE (including the modifications that might have been done since your first post.) ????????

  • dan

It was miss spelled thanks.

Kmart644:
It was miss spelled thanks.

Blame it on her, eh?