help micro sd configuration urgent Pantalla tft MCUFRIEND

Hello ! I am new to arduino and they gave me a tft screen of mcufriend but the problem is that I am not able to communicate with the sd and the examples given by the library of the manufacturer are very confusing and I am doing a project! and to show the temperature data through that screen! everything was fine because I decided to use the flash memory of the arduino mega but it reaches a point where the bitmap arrays are not displayed to me and I do not know what to do but if I have space left in the memory flah! I have it at 48% then because it is not displayed! Then I told myself to use an external storage but I could not with the sd! help with this case please!

Note: I have the MCUFRIEND screen tft touch 3.95 inch driver 9488

attached the manufacturer's library and the sd code that gives the both pal one and mega

library http://downloads.arduino.cc/libraries/github.com/prenticedavid/MCUFRIEND_kbv-2.9.7.zip

showBMP_kbv_Uno.ino (9.18 KB)

showBMP_not_Uno.ino (9.41 KB)

Do one thing after the other. Start with displaying stuff on the screen. Once that works you may attach the temperature sensor, read values and write to the serial monitor. If that works too you can try to display that value on the TFT.

If all this works you can try to read from an SD card. Once that works you can try to read a BMP image from the SD card and show it on the screen. After that all works, you can try to combine everything into one sketch.

Yes, I already did! show sensor data and everything ok but I want to put icons on the screen! and it turns out that I did not know how to use that esd since the code is somewhat complex, I was using flash memory but there comes a point that is overwritten by the last fix that I put! then try until you fit the sd! but the code that gives the manufacturer for the arduino UNO already serves but the code for the mega do not understand a code section that is this!

/ MCUFRIEND UNO shields have microSD on pins 10, 11, 12, 13
// The official <SD.h> library only works on the hardware SPI pins
// e.g. 11, 12, 13 on a Uno
// e.g. 50, 51, 52 on a Mega2560
// e.g. 74, 75, 76 on a Due
//
// if you are not using a UNO,  you must use Software SPI:
//
// install v1.0.1 of the <SdFat.h> library with the Arduino Library Manager.
// edit the src/SdFatConfig.h file to #define ENABLE_SOFTWARE_SPI_CLASS 1
//
// copy all your BMP files to the root directory on the microSD with your PC
// (or another directory)

#include <SPI.h>             // f.k. for Arduino-1.5.2
#define USE_SDFAT
#include <SdFat.h>           // Use the SdFat library
SdFatSoftSpi<12, 11, 13> SD; //Bit-Bang on the Shield pins

I am using the code "showBMP_Not_Uno"

but the code for the mega do not understand a code section that is this!

What exactly is not understood? Does that mean you get an error message? Why are you hiding that from us?

I guess you haven't change the SdFatConfig.h file to have the precompiler definition SD_SPI_CONFIGURATION set to 3 to activate the SdFatSoftSpi class.