I am trying to compile a program for managing a 7" display using the libraries from :
And when trying to compile the example named :
Basic_setup.ino
I get this error :
C:\Users\Carlos\AppData\Local\Temp\build1860949181849964003.tmp\basic_setup.cpp.o: In function setup': C:\Program Files (x86)\Arduino/basic_setup.ino:33: undefined reference to RA8875::begin(RA8875sizes, unsigned char)'
C:\Users\Carlos\AppData\Local\Temp\build1860949181849964003.tmp\basic_setup.cpp.o: In function __static_initialization_and_destruction_0': C:\Program Files (x86)\Arduino/basic_setup.ino:21: undefined reference to RA8875::RA8875(unsigned char, unsigned char)'
collect2.exe: error: ld returned 1 exit status
Error de compilación
But the routine exist at the RA8875.cpp module. Any idea that can help me?
I am using Arduino UNO R3.
The code where the error appear is this :
/*
Just a basic example, an hello world example.
*/
//#include <SPI.h> #include "D:\01_Proyectos\En_Desarrollo\Pantalla_7_RA8875\RA8875-0.70\SPI.h" #include "D:\01_Proyectos\En_Desarrollo\Pantalla_7_RA8875\RA8875-0.70\RA8875.h"
/*
Arduino's
You are using 4 wire SPI here, so:
MOSI: 11//Arduino UNO
MISO: 12//Arduino UNO
SCK: 13//Arduino UNO
the rest of pin below:
*/
#define RA8875_CS 10 //Uno can use any pin #define RA8875_RESET 9 //any pin, 255 disable it or just avoid
tft = RA8875(RA8875_CS,RA8875_RESET);//arduino's
//RA8875 tft = RA8875(RA8875_CS);//arduino's no rst
void setup()
{
Serial.begin(38400);
//long unsigned debug_start = millis ();
//while (!Serial && ((millis () - debug_start) <= 5000)) ;
Serial.println("RA8875 start");
// tft.begin(RA8875_800x480);
tft.begin(Adafruit_800x480);
/* Adafruit_480x272 Adafruit_800x480 RA8875_480x272 RA8875_800x480 /
/
By default the library init display at 16bit color depth but
you can optionally force the display to work at 8 bit:
// tft.begin(RA8875_480x272,8);//force obit color depth /
/
Now that board it's inited you can use any draw or text command:
*/
tft.print("Hello World!");
}
That just looks like you haven't installed the library properly. Did you remove the "-master" from the folder name after you downloaded it from Github? Where have you saved the RA8875 folder?
Yes it was something related with the libraries and the route to them.
This has been solved, now I am dealing with another error:
D:\01_Proyectos\En_Desarrollo\Pantalla_7_RA8875\RA8875-0.70\programs\RA8875.cpp:1922:76: error: 'PROGMEM_read' was not declared in this scope
charW = PROGMEM_read(&_currentFont->chars[charIndex].image->image_width);
and "PROGMEM_read" it is not on "avr/pgmspace.h" or I am not able to look for it.
Sorry for asking so many questions, it is my starting time with ARduino.