Blynk 2.0 + TFT_espi incompatible?

I can’t use blynk 2.0 with tft espi library.
it can’t show screen, but Blynk still works
please help me

image


//Blynk Define
#define BLYNK_TEMPLATE_ID "******"
#define BLYNK_DEVICE_NAME "*****"
#define BLYNK_AUTH_TOKEN "*******"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
#define APP_DEBUG


#include <TFT_eSPI.h>
#include <SPI.h>
#include "BlynkEdgent.h"

TFT_eSPI tft = TFT_eSPI();

void setup()
{
  Serial.begin(9600);
  BlynkEdgent.begin();
  tft.init();
  tft.setRotation(1);

void loop() {
  BlynkEdgent.run();
  tft.fillScreen(TFT_GREEN);
  Serial.println("GREEN");
  delay(2000); 
  tft.fillScreen(TFT_BLUE);
  Serial.println("BLUE"); 
  delay(2000);
}

You have no board type defined, so the custom board type settings defined in Settings.h will be used. If that’s unchanged from the default then GPIO4
is assigned to the LED, which will be causing a conflict.

Also, you can’t use delays or put that additional code in your void loop. You should read this…

https://docs.blynk.io/en/legacy-platform/legacy-articles/keep-your-void-loop-clean

Pete.

Can I change the pin in setting.h to something else?

Yes, of course.

Pete.

Thank you very much.