WEMOS D1 MINI PRO TFT屏幕8脚SPI接口

接线图

接线图

CS —————D8 GPIO15 有的屏可以不接
BLK—————3V3 低电平触发的屏幕可以不接


WEMOS D1 MINI针脚
按照esp8266的传统接法 修改配置文件
image.png
选择芯片
image.png
分辨率
image.png
取消接口注释
image.png
上传示例程序
image.png
上传自制图片
1.转换图片为565格式
565转换
把导出的 .c 图片扩展名修改为 .h
修改该文件:下图第一行貌似可以删除。第二行前面蓝色部分替换成下图样子。
image.png
2.代码:
#include <SPI.h>
#include <TFT_eSPI.h>
#include "As.h"
#include "yoyo240.h"
//#include "yoyo240.h"
//#include "qq240x309.h"
TFT_eSPI tft = TFT_eSPI();

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  tft.begin();
  tft.init();
  tft.fillScreen(TFT_BLACK);
  tft.setCursor(60,200,1);
  tft.setTextColor(TFT_YELLOW);
  tft.setTextSize(2);
  tft.println("TFT_Text");
  tft.fillCircle(100,100,10,TFT_BLUE);
  //tft.drawLine(10,50,118,50,TFT_WHITE);
  tft.drawPixel(186,279,TFT_RED);
  tft.setTextColor(TFT_WHITE,TFT_BLUE);
  tft.setCursor(80,80,1);
  tft.println("TFT_Text");
  tft.setRotation(1);
  tft.setSwapBytes(true); 
  //tft.pushImage(52,40, 260, 146, zx1); // 在(4,4)处显示Name图片 128×128像素
  delay(3000);
 tft.pushImage(0,0, 240, 240, yoyo240);
}

void loop() {
  /*
  tft.fillScreen(TFT_BLACK);
  tft.pushImage(0,0, 240, 309,qq240x309);
  delay(2000);
    tft.fillScreen(TFT_BLACK);
  tft.setCursor(100,150,1);
  tft.setTextColor(TFT_YELLOW);
  tft.setTextSize(4);
  tft.println("LOVE MM");
  delay(1000);
   // tft.fillScreen(TFT_BLACK);
  tft.pushImage(0,20, 320, 200, zx320x200);
  delay(2000);
    tft.fillScreen(TFT_BLACK);
  tft.pushImage(20,40, 235, 143, yoyo);
  delay(2000);

  
  tft.setCursor(60,150,1);
  tft.setTextColor(TFT_YELLOW);
  tft.setTextSize(2);
  tft.println("LOVE MM");
  delay(1000);
  
  tft.pushImage(220,130, 64, 64, Astronaut[i]); 
  i+=1;
  if(i>8)
  i=0;
  delay(1000);
  */

}
image.png
image.png

image.png

image.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容