米尔电子
直播中

jf_1137202360

8年用户 1358经验值
擅长:嵌入式技术
私信 关注
[技术]

【米尔MYD-J1028X开发板试用体验】实现串口调试助手进行串口收发测试

前言

默认xface使用的是Debian X Terminal Emulator 所以需要线安装终端
sudo apt-get install terminator 否则打不开终端
Applications -> Settings -> Settings manager -> Prefered Applications -> Utilities 可以指定使用的终端。

安装tkinter

sudo apt-get install python3-tk

此时可以import tkinter了。

root@localhost:~# python3

Python 3.6.9 (default, Jun 29 2022, 11:45:57)

[GCC 8.4.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

> > > import tkinter

> > > 

安装pip

apt-get install python3-pip python3-dev build-essential

pip3 install --upgrade pip3

安装serial

pip3 --trusted-host pypi.python.org --trusted-host pypi.tuna.tsinghua.edu.cn install pyserial -i https://pypi.tuna.tsinghua.edu.cn/simple/

串口调试助手

下载代码

git clone https://gitee.com/qinyunti/python_tkinter_uart.git

cd python_tkinter_uart

运行测试

python3 Python_Tkinter_UART.py
image.png

UART2的引脚对应J18的8,10引脚,对应设备号是/dev/ttyS1

image.png
image.png

image.png

发送数据可以看到接收到一样的数据

image.png

更多回帖

发帖
×
20
完善资料,
赚取积分