biubiu108 发表于 2022-10-20 18:13

LCD 显示屏连接Raspberry Pi

Raspberry Pi 是DIY界十分流行的微型电脑系统,它预装Linux系统,体积仅信用*大小,搭载ARM架构处理器,运算性能和智能手机相仿。加上USB接口,快速以太网接口、SD卡扩展接口以及HDMI,使它十分适合用于人机界面的搭建。Topway的TFT LCD模块则是把复杂的显示驱动逻辑与电路嵌入在模块当中,大大减轻了工程师的工作量,也增加了系统的可靠性。硬件连接按照Raspberry Pi与LMT070DICFWD-NFA连接示意图连接硬件
[*]使用HDMI线连接Raspberry Pi与LMT070DICFWD-NFA模块
[*]使用USB线连接Raspberry Pi与RTP
[*]Raspberry Pi电源5V供电,LMT070DICFWD-NFA模块电源12V供电
安装操作系统
[*]在Raspberry Pi官网下载系统Raspbian GNU/Linux 9 (stretch), https://www.raspberrypi.org
[*]用SD Card Formatter工具格式化内存卡,用Win32DiskImager工具写镜像文件到内存卡
[*]内存卡插入树莓派3B+ 主板中,开机并按提示安装系统
设置显示屏分辨率
[*]更新配置文件config.txt,设置最佳分辨率为800 x 400.
[*]可以在windows下修改config.txt或进入Raspbian后用命令修改
[*]修改和添加下列代码:
   disable_overscan=1
   overscan_left=16
   overscan_right=16
   overscan_top=16
   overscan_down=16
   framebuffer_width=800
   framebuffer_height=480
   hdmi_group=2
   hdmi_mode=87
   hdmi_cvt=800 480 60 6 0 0 0配置网络RJ45插入网线后可以正常联网 或 Wifi输入密码连接后可以正常联网

安装触摸屏驱动
[*]下载安装驱动pmLinux-Raspbian_v4_5_8_R1_(Jessie)_20180131

[*]打开校准软件PenMount Utility进行校准

安装虚拟键盘安装开发包   sudo apt-get install libfakekey-dev libpng-dev libxft-dev autoconf libtool -y安装并编译matchbox-keyboard   git clone https://github.com/mwilliams03/matchbox-keyboard.git cd matchbox-keyboard ./autogen.sh
   make
   sudo make install安装共享的 matchbox库   sudo apt-get install libmatchbox1 -y创建一个新文件夹   sudo nano /usr/bin/toggle-matchbox-keyboard.sh将下面的文本复制进去:      #!/bin/bash
      #This script toggle the virtual keyboard
      PID=`pidof matchbox-keyboard`
      if [ ! -e $PID ]; then
      killall matchbox-keyboard
   else
       matchbox-keyboard&
   fi设置可执行权限   sudo chmod +x /usr/bin/toggle-matchbox-keyboard.sh再开始菜单添加一个项目   sudo nano /usr/share/applications/toggle-matchbox-keyboard.desktop将下面的文本复制进去:   
   Name=Toggle Matchbox Keyboard
   Comment=Toggle Matchbox Keyboard
   Exec=toggle-matchbox-keyboard.sh
   Type=Application
   Icon=matchbox-keyboard.png
   Categories=Panel;Utility;MB
   X-MB-INPUT-MECHANSIM=True再任务栏上创建图标,打开LXDE面板设置   nano ~/.config/lxpanel/LXDE-pi/panels/panel将下面的文本复制进去:   Plugin {
      type = launchbar
       Config {
          Button { id=toggle-matchbox-keyboard.desktop }
          Button { id=lxde-screenlock.desktop }
          Button { id=lxde-**ut.desktop }
      }
   }可以使用以下语句从命令行启动 matchbox-keyboard键盘。
matchbox-keyboard可以使用-s整数参数调整窗口大小。 整数是屏幕宽度的30%-100%之间的值。
matchbox-keyboard -s 50支持自定义键盘,有些已加载到/ usr / local / share / matchbox-keyboard/ 中。
matchbox-keyboard -s 50 extended

biubiu108 发表于 2022-10-20 18:14

欢迎访问官网:www.topwaydisplay.com
页: [1]
查看完整版本: LCD 显示屏连接Raspberry Pi