Program will not compile with a known code

I am trying to duplicate a project that has been done and published in many websites a number of times, 4x4 led cube. I am using the code that is out there and everyone that has posted the code is nearly identical. For some reason the code gives me an error and will not compile. I am a beginner and I have very little programming experience. I would appreciate any helpful tips to make this code work.

This is the error I get.

sketch_nov18a.ino:10:1: error: 'prog_char' does not name a type
sketch_nov18a.ino: In function 'void loop()':
sketch_nov18a.ino:64:23: error: 'PatternTable' was not declared in this scope
Error compiling.

This is the software version I am using.
Arduino 1.5.8

This is the beginning of the program which I believe is initiating the error: if needed I can download the entire code.

#include <avr/pgmspace.h> // allows use of PROGMEM to store patterns in flash

#define CUBESIZE 4
#define PLANESIZE CUBESIZE*CUBESIZE
#define PLANETIME 500 // time each plane is displayed in us -> 100 Hz refresh
#define TIMECONST 20 // multiplies DisplayTime to get ms - why not =100?

// LED Pattern Table in PROGMEM - last column is display time in 100ms units
// TODO this could be a lot more compact but not with binary pattern representation
prog_char dataType PROGMEM PatternTable[] = {
// blink on and off

B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,100,

#include <avr/pgmspace.h> // allows use of PROGMEM to store patterns in flashJust as a wild guess, maybe it can't find pgmspace.h.

prog_char dataType PROGMEM PatternTable[]

"dataType" ?

vcjfegonzalez:
This is the software version I am using.
Arduino 1.5.8

Are you using an Arduino DUE or YUN? If not you should not be using that beta-test version of Arduino. Use the released version: 1.0.6.

AWOL:

prog_char dataType PROGMEM PatternTable[]

"dataType" ?

You have your answer delete dataType

I am using Arduino Due. I am going to try deleting "dataType", then I will upload the 1.0.6 software version. I will let you all know if these changes work. Thanks for the input.

vcjfegonzalez:
I am using Arduino Due. I am going to try deleting "dataType", then I will upload the 1.0.6 software version. I will let you all know if these changes work. Thanks for the input.

The DUE has a completely different processor than the UNO so you must use the 1.5 beta-test version. I don't know if the DUE has anything like the PROGMEM features of the AVR processor used in the Arduino UNO. It may not be necessary. I would try removing the PROGMEM stuff and try declaring the data as 'const':

// #include <avr/pgmspace.h> // allows use of PROGMEM to store patterns in flash
 
#define CUBESIZE 4
#define PLANESIZE CUBESIZE*CUBESIZE
#define PLANETIME 500 // time each plane is displayed in us -> 100 Hz refresh
#define TIMECONST 20 // multiplies DisplayTime to get ms - why not =100?
 
// LED Pattern Table in PROGMEM - last column is display time in 100ms units
// TODO this could be a lot more compact but not with binary pattern representation
// prog_char dataType PROGMEM PatternTable[] = {
const unsigned char PatternTable[] = {// blink on and off
 
B1000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,B0000,

Where the array is referenced you will have to remove the special function calls used on the AVR processor to access FLASH. Just treat it as a normal array.

I upgraded to the 1.0.6 software version and the script worked well, but I discovered some limitations on the led cube. I also discovered the board will not reset even after setting the reset switch. I also tried the script on a different board, Mega 2560. It also would not reset.

vcjfegonzalez:
I upgraded to the 1.0.6 software version and the script worked well, but I discovered some limitations on the led cube. I also discovered the board will not reset even after setting the reset switch. I also tried the script on a different board, Mega 2560. It also would not reset.

Sounds like a completely different problem from the original problem of being unable to compile.
You should write another post for this new problem and include ALL your wiring and code. It may be an electrical problem or it may have something to do with how your sketch is written.