TFT彩屏模块主要部件为LCD显示屏,此液晶屏为串口液晶屏,能通过串口和主控板通信,从而显示大小不同,颜色不同的字体和图形。本模块接口是蓝/灰色色标,说明是双数字接口,需要连接到主板上蓝色或灰色标识的接口。
TFT彩屏模块有四个针脚的接头,每个针脚的功能如下表:
序号 | 引脚 | 功能 |
---|---|---|
1 | TX | 串口数据发送口 |
2 | RX | 串口数据接收口 |
3 | VCC | 接电源 |
4 | GND | 接地 |
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>孕妇隔离防护套装</title> <meta name="keywords" content="孕妇隔离防护套装孕妇隔离防护套装" /> <meta name="description" content="孕妇隔离防护套装孕妇隔离防护套装" /> <meta name="generator" content="openwbs V5.8.6" /> <meta name="author" content="openwbs team" /> <meta name="copyright" content="2008-2020 OpenWBS Inc." /> <meta name="runtime" content="0.2700" /> <meta name="queries" content="70" /> <link rel="shortcut icon" href="http://demo211.openwbs.com/ow-content/uploads/favicon.ico" type="image/x-icon" /> <link rel="icon" href="http://demo211.openwbs.com/ow-content/uploads/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" href="/ow-content/templates/ow.demo211.pc/css/ow.global.css?v=230228" /> <link rel="stylesheet" href="/ow-content/templates/ow.demo211.pc/css/ow.main.css?v=230228" /> <link rel="stylesheet" href="/ow-content/templates/ow.demo211.pc/css/ow.owcmt.css?v=230228" /> <script type="text/javascript" src="/ow-content/js/pc/jquery.js?v=230228"></script> <script type="text/javascript" src="/ow-content/js/pc/ow.js?v=230228"></script> <script type="text/javascript" src="/ow-content/js/pc/com.js?v=230228"></script>
● RJ25连接
由于TFT彩屏模块接口是蓝/灰色色标,当使用RJ25接口时,需要连接到主控板上带有蓝色或灰色色标的接口。以 Makeblock Orion 为例,可以连接到5号接口,如图:
● 杜邦线连接
当使用杜邦线连接到 Arduino Uno 主板时,模块TX、RX引脚需要分别连接到RX、TX口上,如下图所示:
● mblock3
打开扩展管理器
添加 Me TFT扩展
使用mblock图形化编程模块进行编程
TFT彩屏里有内置的图片可以使用显示图片语句块进行调用,以及丰富的画图语句块可以绘制任何你想要的图形
● Arduino编程
如果使用 Arduino 编程,需要调用库Makeblock-Library-master来控制TFT彩屏。
本程序通过 Arduino 编程显示不同的图案及文字。
函数 | 说明 |
---|---|
CLS(c) | 用c颜色清屏 |
SBC(c) | 设置背景色C,显示汉字等时无点阵时填的颜色 |
PS(x,y,c) | 在(x,y)的地方画一个颜色c的点 |