hi all
i have TFT ILI9486 with touch controller
i am using MCUFRIEND_KBV library
i am using the default sketch for BMP for UNO board
my problem is
when the TFT shows the image it refresh every 5 seconds and reload the image
how can i make the image remains stable without reloading
F8VOA
2
3.5inch_Arduino_ILI9486_V1.3
Hi , I hade the same problem . Please read this post .David explain the solution.
Marco
Most of my examples do "something".
The BMP example displays every .BMP file that it finds on your SD directory.
Then it starts again.
If you only have one BMP file, it will display it repeatedly.
Look at the example code in the loop().
If you only want to display a BMP with a known name e.g. "filename.bmp" you just say:
showBMP("filename.bmp", 0, 0);
David.
david_prentice:
Most of my examples do "something".
The BMP example displays every .BMP file that it finds on your SD directory.
Then it starts again.
If you only have one BMP file, it will display it repeatedly.
Look at the example code in the loop().
If you only want to display a BMP with a known name e.g. "filename.bmp" you just say:
showBMP("filename.bmp", 0, 0);
David.
i have modified it but still facing the same problem
void loop()
{
char *nm = namebuf + pathlen;
File f = root.openNextFile();
uint8_t ret;
uint32_t start;
if (f != NULL) {
#ifdef USE_SDFAT
f.getName(nm, 32 - pathlen);
#else
strcpy(nm, (char *)f.name());
#endif
f.close();
strlwr(nm);
if (strstr(nm, ".bmp") != NULL && strstr(nm, NAMEMATCH) != NULL) {
Serial.print(namebuf);
Serial.print(F(" - "));
tft.fillScreen(0);
start = millis();
ret = showBMP("flower.bmp",0,0);
switch (ret) {
case 0:
F8VOA:
3.5inch_Arduino_ILI9486_V1.3
Hi , I hade the same problem . Please read this post .David explain the solution.
Marco
thank u very much,but where is this post?
Copy-paste text from the Serial Terminal to your message. Then I can see what is going wrong.
Otherwise, Just try:
#include <SPI.h> // f.k. for Arduino-1.5.2
#include <SD.h> // Use the official SD library on hardware pins
#include <Adafruit_GFX.h> // Hardware-specific library
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define SD_CS 10
#define PALETTEDEPTH 0 // do not support Palette modes
void setup()
{
uint16_t ID;
ID = tft.readID();
Serial.println(ID, HEX);
tft.begin(ID);
tft.fillScreen(0x001F);
bool good = SD.begin(SD_CS);
if (good) {
showBMP("/flower.bmp", 0, 0); //ignore any error return value
}
}
void loop()
{
}
...
david_prentice:
Copy-paste text from the Serial Terminal to your message. Then I can see what is going wrong.
Otherwise, Just try:
#include <SPI.h> // f.k. for Arduino-1.5.2
#include <SD.h> // Use the official SD library on hardware pins
#include <Adafruit_GFX.h> // Hardware-specific library
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define SD_CS 10
#define PALETTEDEPTH 0 // do not support Palette modes
void setup()
{
uint16_t ID;
ID = tft.readID();
Serial.println(ID, HEX);
tft.begin(ID);
tft.fillScreen(0x001F);
bool good = SD.begin(SD_CS);
if (good) {
showBMP("/flower.bmp", 0, 0); //ignore any error return value
}
}
void loop()
{
}
...
this code is working perfectly
thank u very much