(4)主工程代码如下: #include<Arduino.h>#include<SPI.h>#include<lvgl.h>#include<TFT_eSPI.h> // Hardware-specific library#include"demos/lv_demos.h"#include<bb_captouch.h>#include"test_ui/ui.h"// These defines are for a low cost ESP32 LCD board with the GT911 touch controller#define...
//For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation//#define TFT_WIDTH 80//#define TFT_WIDTH 128#defineTFT_WIDTH 240//ST7789 240 x 240 and 240 x 320//#define TFT_HEIGHT 160//#define TFT_HEIGHT 128//#define TFT_HEIGHT 240//ST...
/*** This is a library for the ST7789 IPS SPIdisplay. Originally written by Limor Fried/Ladyadafor Adafruit Industries. Modified by AnanevIlia ***/ #include "Arduino_ST7789." #include <limits.h> #include "pins_arduino.h" # "wiring_private.h" # <SPI.h> ...
方法一:通过Arduino IDE 2 的安装方法 1,点击Library 2,搜索框输入「GFX Library for Arduino」 3,点击「INSTALL」进行安装 4,安装完成后,该库的名称旁边会显示「INSTALLED」 方法二:GITHUB 仓库下载安装方法 1,首先到GITHUB下载「GFX Library for Arduino」:https://github.com/moononournation/Arduino_GFX 2,...
在Arduino "库管理器"中搜索“Adafruit GFX Library”,选择最新版本,点击 安装 进行安装。此库的GitHub地址为:https:///adafruit/Adafruit-GFX-Library Arduino-ST7789-Library 此库暂时无法通过库管理器安装,可以到GitHub下载包,放到Arduino的库文件目录,重新打开Arduino就会自动加载了。
这是屏幕ST7789的启动 include <Arduino_GFX_Library.h> #define GFX_BL DF_GFX_BL // default backlight pin, you may replace DF_GFX_BL to actual backlight pin /* More dev device declaration: https://github.com/moononournation/Arduino_GFX/wiki/Dev-Device-Declaration */ ...
在工具->管理库中搜索"ST7735",安装'Adafruit ST7735 and ST7789 Library' 此外,还需要安装Adafruit的几个基础库,总共四个,如图: 需要安装的库 1.3 找到示例程序 正确安装后,就可以在示例中找到程序,点击打开'graphics test',从程序中我们可以看出,TFT屏幕采用的是SPI协议通讯 ...
ST7789 1.3“IPS 显示器×1 301420 锂电池×1 锂电池充电板×1 DS3231M RTC芯片×1 RTC电池×1 表带×1 二极管1N5822×1 6毫米M2螺丝×4 铜箔胶带×1 电线×若干 处理屏幕 1、处理开发板和 LCD 显示屏 使用一小块 PET 塑料板将 Arduino 开发板和 IPS 显示器粘在一起。
LCD是项目中比较常用的外设,基于Arduino开发有个好处就是它很多相关的库可用,这对于项目的开发或者前期的方案验证来说是非常方便的,缺点是灵活性较差。Arduino支持很多硬件,我们这一讲主要基于ESP8266和ESP32来讲解图片的显示。 1 硬件介绍 1.1 硬件配置
#include <Adafruit_ST7789.h> // Hardware-specific library for ST7789 #include <SPI.h> // For the breakout board, you can use any 2 or 3 pins. // These pins will also work for the 1.8" TFT shield. #define TFT_CS 22 #define TFT_RST 7 // Or set to -1 and connect to Arduin...