me sale esteerror cuando intento coompilar
Compiling 'relecontrol' for 'Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)'
glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))
:static unsigned char font[] PROGMEM = {
Arduino.h:In file included from
Adafruit_GFX.h:from
Adafruit_GFX.cpp:from
glcdfont.c:9:30: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))
:static unsigned char font[] PROGMEM = {
Adafruit_PCD8544.cpp:In file included from
glcdfont.c:9:30: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))
:static unsigned char font[] PROGMEM = {
Adafruit_PCD8544.cpp:34:29: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))
:extern uint8_t PROGMEM font[]
Error compiling libraries
dejo adjuntado los codigos y aca les dejo el link del pryecto original!
datura_mega_v19.ino (58.3 KB)
Tu problema se resuelve reemplazando static por const
const unsigned char PROGMEM pr[] = {
Luego de arreglar tu problema inicial, salta este otro
C:/Users/Ricardo/Downloads/Foro arduino/Borrar/glcdfont.c:9:23: error: variable 'font' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
static unsigned char font[] PROGMEM = {
De nuevo lo resuelves asi, nada de static, debe ser const
const unsigned char font[] PROGMEM = {
y hay mas errores.
C:/Users/Ricardo/Downloads/Foro arduino/Borrar/glcdfont.c:9:22: error: 'font' has a previous declaration as 'const unsigned char font [1275]'
const unsigned char font[] PROGMEM = {
otro mas
C:/Users/Ricardo/Downloads/Foro arduino/Borrar/Adafruit_PCD8544.cpp:34:29: error: variable 'font' must be const in order to be put into read-only section by means of 'attribute((progmem))'
extern uint8_t PROGMEM font[];
^
C:/Users/Ricardo/Downloads/Foro arduino/Borrar/Adafruit_PCD8544.cpp:34:29: error: conflicting declaration 'uint8_t font []'
In file included from C:/Users/Ricardo/Downloads/Foro arduino/Borrar/Adafruit_PCD8544.cpp:31:0:
C:/Users/Ricardo/Downloads/Foro arduino/Borrar/glcdfont.c:9:21: error: 'font' has a previous declaration as 'const unsigned char font [1275]'
const unsigned char font[] PROGMEM = {
Te lo dejo a ti
Exacto... ubica el error porque esta aparentemente repetido.
o bien saca el archivo bigfont.c para probar porque parece que ya lo usan en adafruit_PCD8544.cpp