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

接線圖

接線圖

CS —————D8 GPIO15 有的屏可以不接
BLK—————3V3 低電平觸發(fā)的屏幕可以不接


WEMOS D1 MINI針腳
按照esp8266的傳統(tǒng)接法 修改配置文件
image.png
選擇芯片
image.png
分辨率
image.png
取消接口注釋
image.png
上傳示例程序
image.png
上傳自制圖片
1.轉(zhuǎn)換圖片為565格式
565轉(zhuǎn)換
把導(dǎo)出的 .c 圖片擴(kuò)展名修改為 .h
修改該文件:下圖第一行貌似可以刪除。第二行前面藍(lán)色部分替換成下圖樣子。
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
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容