Simple and clear operation-ESP8266 NodeMCU drives TFT LCD screen (prelude to making transparent small TV)

Preface

I saw a small transparent TV at station B a few days ago, and I was immediately attracted to it. Except for 3D printing, welding lines, beam splitter prisms, etc., it involves nothing more than these three things:

  • esp8266
  • Display screen
  • Displayed content (complex writable front and back ends)

Insert picture description here

So I played with the esp8266 NodeMCU and the TFT LCD screen in the past two days.

After collecting a lot of information, I found that the esp8266 driver display screen has a wide variety of types, and many online tutorials are complicated and difficult to understand, which is not suitable for beginners. After considering the mood of large and small white makers, I have sorted out my achievements in the past few days, and it should be quite friendly to all the friends~

Prepare materials

  • esp8266 NodeMCU (serial WiFi module) Taobao price is ten yuan
  • 1.44inch SPI Arduino Module Black SKU: MAR1442 (TFT LCD display) Taobao price is about 20

What I use here is the common esp8266 NodeMCU development version, which can be programmed with arduino IDE;

The display screen is a kind of display screen with few online tutorials-TFT (Thin Film Transistor) LCD, also known as active transistor thin film transistor liquid crystal display, which is commonly known as true color liquid crystal display by many people;

For details, please refer to: 1.44inch SPI Arduino Module Black SKU information For
more display information, please refer to: http://www.lcdwiki.com/Main_Page

esp8266 NodeMCU (serial WiFi module)

Product physical map:
Insert picture description here
its product pin description:
Insert picture description here

1.44inch SPI Arduino Module Black SKU: MAR1442 (TFT LCD display)

Label PIN Pin description
1 VCC Power is positive
2 GND Power is positive
3 GND Power ground
4 NC No definition, reserved, no wiring required
5 NC No definition, reserved, no wiring required
6 LED LCD backlight control signal (if no control is needed, please connect 3.3V)
7 CLK LCD SPI bus clock pin
8 SDI LCD SPI bus data pin
9 RS LCD register, data selection control pin
10 RST LCD reset control pin
11 CS LCD chip select control pin

wiring

After taking everyone's preliminary understanding of the esp8266 NodeMCU and TFT LCD display, let's connect it next.

Label esp8266 NodeMCU corresponding wiring pin Wiring pins corresponding to TFT liquid crystal display
1 D1 RS
2 D2 RST
3 D5 CLK
4 D7 SDI
5 D8 CS
6 GND GND
7 3V VCC
8 3V LED

The following is the wiring diagram:
Insert picture description here
the program corresponds to the wiring, and the following is part of the program code:

//这里只展现部分代码,详细代码见下方链接
#include <ESP8266WiFi.h>            
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include <FS.h>
#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library
#include <SPI.h>

#define TFT_CS  15  // Chip select line for TFT display
#define TFT_RST  4  // Reset line for TFT (or see below...)
#define TFT_DC   5  // Data/command line for TFT

......

Burning program

There are a lot of tutorials on the Internet for this step of burning, and here is no different, just mention it briefly

Preparations:
1. Install arduino ide for esp8266 (use arduino ide to develop 8266).
2. Find the library location in your arduino, and load the attached library file into the ide directory. (ST7735S library is slightly modified for 8266 use)
Insert picture description hereInsert picture description here
3. Looking at the example, we know the usage of this tft screen.
4. Download the source code in the burning attachment.
5. Optional, install the Bonjour service in the attachment for mdns. You can enter the domain name in the browser to access the 8266 web, and you can directly access esp8266fs.local.

work process

Created with Raphaël 2.2.0 8266连接路由器(WIFI或热点) 8266建立web服务器 电脑访问web页面 发送图片给TFT显示 yes no

Insert picture description here

postscript

I bought a 25.4mm, 1:1 beam splitting prism some time ago (it costs 70 or 80 yuan to fight the night). Next, I plan to study the transparent small TV that is hot on the Internet, and add more functions to it. , Everyone, look forward to it~

correct! I left a small problem after the classmates burned the program, it is not a bug, interested classmates can search by themselves on Baidu, or leave a message under the comment area

Reference

ESP8266 TFT (ST7735) color screen-web image

Program code link:
link: https://pan.xunlei.com/s/VMX16xkL2h72fE67_MFRvb0rA1
extraction code: ish5

Guess you like

Origin blog.csdn.net/qq_45430571/article/details/115321614