ERROR <avr/pgmspace.h> EN MATRIZ CON MAX78219


hola compañeros, necesito de su ayuda, hace poco quise realizar una matriz de led usando el ic max7219 y bueno en las primeras pruebas todo bien, pero en cuanto empece usar la memoria eeprom con la libreria <avr/pgmspace.h> me sale este error:

code: [select]
arduino:1.6.3 (windows 7), placa:"arduino uno"

opciones de compilación cambiadas, reconstruyendo todo

utilizando biblioteca maxmatrix en carpeta: c:\users\ati\documents\arduino\libraries\maxmatrix (legacy)



d:\arduino-1.6.3\hardware\tools\avr/bin/avr-g++ -c -g -os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -mmd -mmcu=atmega328p -df_cpu=16000000l -darduino=10603 -darduino_avr_uno -darduino_arch_avr -id:\arduino-1.6.3\hardware\arduino\avr\cores\arduino -id:\arduino-1.6.3\hardware\arduino\avr\variants\standard -ic:\users\ati\documents\arduino\libraries\maxmatrix c:\users\ati\appdata\local\temp\build6897386104096725761.tmp\panel3.cpp -o c:\users\ati\appdata\local\temp\build6897386104096725761.tmp\panel3.cpp.o

panel3.ino:5:9: error: 'prog_uchar' not name type

panel3.ino: in function 'void printcharwithshift(char, int)':

panel3.ino:134:20: error: 'ch' not declared in scope

error de compilación


he estado googleando pero aun no puedo solucionarlo así que decidí buscar su ayuda, el código que quiero compilar es el siguiente:

code: [select]
#include <maxmatrix.h>
#include <avr/pgmspace.h>
 
 
progmem prog_uchar ch[] = {
3, 8, b00000000, b00000000, b00000000, b00000000, b00000000, // space
1, 8, b01011111, b00000000, b00000000, b00000000, b00000000, // !
3, 8, b00000011, b00000000, b00000011, b00000000, b00000000, // "
5, 8, b00010100, b00111110, b00010100, b00111110, b00010100, // #
4, 8, b00100100, b01101010, b00101011, b00010010, b00000000, // $
5, 8, b01100011, b00010011, b00001000, b01100100, b01100011, // %
5, 8, b00110110, b01001001, b01010110, b00100000, b01010000, // &
1, 8, b00000011, b00000000, b00000000, b00000000, b00000000, // '
3, 8, b00011100, b00100010, b01000001, b00000000, b00000000, // (
3, 8, b01000001, b00100010, b00011100, b00000000, b00000000, // )
5, 8, b00101000, b00011000, b00001110, b00011000, b00101000, // *
5, 8, b00001000, b00001000, b00111110, b00001000, b00001000, // +
2, 8, b10110000, b01110000, b00000000, b00000000, b00000000, // ,
4, 8, b00001000, b00001000, b00001000, b00001000, b00000000, // -
2, 8, b01100000, b01100000, b00000000, b00000000, b00000000, // .
4, 8, b01100000, b00011000, b00000110, b00000001, b00000000, // /
4, 8, b00111110, b01000001, b01000001, b00111110, b00000000, // 0
3, 8, b01000010, b01111111, b01000000, b00000000, b00000000, // 1
4, 8, b01100010, b01010001, b01001001, b01000110, b00000000, // 2
4, 8, b00100010, b01000001, b01001001, b00110110, b00000000, // 3
4, 8, b00011000, b00010100, b00010010, b01111111, b00000000, // 4
4, 8, b00100111, b01000101, b01000101, b00111001, b00000000, // 5
4, 8, b00111110, b01001001, b01001001, b00110000, b00000000, // 6
4, 8, b01100001, b00010001, b00001001, b00000111, b00000000, // 7
4, 8, b00110110, b01001001, b01001001, b00110110, b00000000, // 8
4, 8, b00000110, b01001001, b01001001, b00111110, b00000000, // 9
2, 8, b01010000, b00000000, b00000000, b00000000, b00000000, // :
2, 8, b10000000, b01010000, b00000000, b00000000, b00000000, // ;
3, 8, b00010000, b00101000, b01000100, b00000000, b00000000, // <
3, 8, b00010100, b00010100, b00010100, b00000000, b00000000, // =
3, 8, b01000100, b00101000, b00010000, b00000000, b00000000, // >
4, 8, b00000010, b01011001, b00001001, b00000110, b00000000, // ?
5, 8, b00111110, b01001001, b01010101, b01011101, b00001110, // @
4, 8, b01111110, b00010001, b00010001, b01111110, b00000000, // a
4, 8, b01111111, b01001001, b01001001, b00110110, b00000000, // b
4, 8, b00111110, b01000001, b01000001, b00100010, b00000000, // c
4, 8, b01111111, b01000001, b01000001, b00111110, b00000000, // d
4, 8, b01111111, b01001001, b01001001, b01000001, b00000000, // e
4, 8, b01111111, b00001001, b00001001, b00000001, b00000000, // f
4, 8, b00111110, b01000001, b01001001, b01111010, b00000000, // g
4, 8, b01111111, b00001000, b00001000, b01111111, b00000000, // h
3, 8, b01000001, b01111111, b01000001, b00000000, b00000000, // i
4, 8, b00110000, b01000000, b01000001, b00111111, b00000000, // j
4, 8, b01111111, b00001000, b00010100, b01100011, b00000000, // k
4, 8, b01111111, b01000000, b01000000, b01000000, b00000000, // l
5, 8, b01111111, b00000010, b00001100, b00000010, b01111111, // m
5, 8, b01111111, b00000100, b00001000, b00010000, b01111111, // n
4, 8, b00111110, b01000001, b01000001, b00111110, b00000000, // o
4, 8, b01111111, b00001001, b00001001, b00000110, b00000000, // p
4, 8, b00111110, b01000001, b01000001, b10111110, b00000000, // q
4, 8, b01111111, b00001001, b00001001, b01110110, b00000000, // r
4, 8, b01000110, b01001001, b01001001, b00110010, b00000000, // s
5, 8, b00000001, b00000001, b01111111, b00000001, b00000001, // t
4, 8, b00111111, b01000000, b01000000, b00111111, b00000000, // u
5, 8, b00001111, b00110000, b01000000, b00110000, b00001111, // v
5, 8, b00111111, b01000000, b00111000, b01000000, b00111111, // w
5, 8, b01100011, b00010100, b00001000, b00010100, b01100011, // x
5, 8, b00000111, b00001000, b01110000, b00001000, b00000111, // y
4, 8, b01100001, b01010001, b01001001, b01000111, b00000000, // z
2, 8, b01111111, b01000001, b00000000, b00000000, b00000000, // [
4, 8, b00000001, b00000110, b00011000, b01100000, b00000000, // \ backslash
2, 8, b01000001, b01111111, b00000000, b00000000, b00000000, // ]
3, 8, b00000010, b00000001, b00000010, b00000000, b00000000, // hat
4, 8, b01000000, b01000000, b01000000, b01000000, b00000000, // _
2, 8, b00000001, b00000010, b00000000, b00000000, b00000000, // `
4, 8, b00100000, b01010100, b01010100, b01111000, b00000000, // a
4, 8, b01111111, b01000100, b01000100, b00111000, b00000000, // b
4, 8, b00111000, b01000100, b01000100, b00101000, b00000000, // c
4, 8, b00111000, b01000100, b01000100, b01111111, b00000000, // d
4, 8, b00111000, b01010100, b01010100, b00011000, b00000000, // e
3, 8, b00000100, b01111110, b00000101, b00000000, b00000000, // f
4, 8, b10011000, b10100100, b10100100, b01111000, b00000000, // g
4, 8, b01111111, b00000100, b00000100, b01111000, b00000000, // h
3, 8, b01000100, b01111101, b01000000, b00000000, b00000000, // i
4, 8, b01000000, b10000000, b10000100, b01111101, b00000000, // j
4, 8, b01111111, b00010000, b00101000, b01000100, b00000000, // k
3, 8, b01000001, b01111111, b01000000, b00000000, b00000000, // l
5, 8, b01111100, b00000100, b01111100, b00000100, b01111000, // m
4, 8, b01111100, b00000100, b00000100, b01111000, b00000000, // n
4, 8, b00111000, b01000100, b01000100, b00111000, b00000000, // o
4, 8, b11111100, b00100100, b00100100, b00011000, b00000000, // p
4, 8, b00011000, b00100100, b00100100, b11111100, b00000000, // q
4, 8, b01111100, b00001000, b00000100, b00000100, b00000000, // r
4, 8, b01001000, b01010100, b01010100, b00100100, b00000000, // s
3, 8, b00000100, b00111111, b01000100, b00000000, b00000000, // t
4, 8, b00111100, b01000000, b01000000, b01111100, b00000000, // u
5, 8, b00011100, b00100000, b01000000, b00100000, b00011100, // v
5, 8, b00111100, b01000000, b00111100, b01000000, b00111100, // w
5, 8, b01000100, b00101000, b00010000, b00101000, b01000100, // x
4, 8, b10011100, b10100000, b10100000, b01111100, b00000000, // y
3, 8, b01100100, b01010100, b01001100, b00000000, b00000000, // z
3, 8, b00001000, b00110110, b01000001, b00000000, b00000000, // {
1, 8, b01111111, b00000000, b00000000, b00000000, b00000000, // |
3, 8, b01000001, b00110110, b00001000, b00000000, b00000000, // }
4, 8, b00001000, b00000100, b00001000, b00000100, b00000000, // ~
};
 
int data = 8;    // din pin of max7219 module
int load = 9;    // cs pin of max7219 module
int clock = 10;  // clk pin of max7219 module
 
int maxinuse = 2;  //how many max7219 connected
 
maxmatrix m(data, load, clock, maxinuse); // define library
 
byte buffer[10];
 
char string1[] = " brainy-bits.com      ";  // scrolling text
 
 
void setup(){
  m.init(); // module max7219
  m.setintensity(5); // led intensity 0-15
}
 
void loop(){
  
  byte c;
  delay(100);
  m.shiftleft(false, true);
  printstringwithshift(string1, 100);  // send scrolling text
 
}
 
// put extracted character on display
void printcharwithshift(char c, int shift_speed){
  if (c < 32) return;
  c -= 32;
  memcpy_p(buffer, ch + 7*c, 7);
  m.writesprite(maxinuse*8, 0, buffer);
  m.setcolumn(maxinuse*8 + buffer[0], 0);
  
  for (int i=0; i<buffer[0]+1; i++)
  {
    delay(shift_speed);
    m.shiftleft(false, false);
  }
}
 
// extract characters scrolling text
void printstringwithshift(char* s, int shift_speed){
  while (*s != 0){
    printcharwithshift(*s, shift_speed);
    s++;
  }
}

bueno espero que me pueda ayudar y/o sacarme de la duda, espero sus respuestas y antemano les agradesco


Arduino Forum > International > Español > Software (Moderators: surbyte, Hector_A) > ERROR <avr/pgmspace.h> EN MATRIZ CON MAX78219


arduino

Comments