当前位置:网站首页>1315_Use the LOOPBACK simulation mode to test whether the pyserial installation is successful
1315_Use the LOOPBACK simulation mode to test whether the pyserial installation is successful
2022-07-30 04:47:00 【grey_csdn】
All learning summary: GreyZhang/g_serial: Some serial learning notes which may be usefull in embedded system debugging. (github.com)
I tried the installation of pyserial and the generation of documents before. This time I found a way to test whether the package was successfully installed.
The working way of pyserial I found two kinds from the document, one is to use the physical real serial port to communicate directly, and the other is the simulation mode.

There is such a chapter in the documentation, in fact, there are some corresponding instructions here.

I mainly read the loop:// URL here, and after reading it, I found that this is actually a simulated behavior.For this, in fact, you can do a functional test of a basic software package, without the need for an actual serial port physical device.At first, I may have misunderstood and thought that LOOP may be related to loops. In fact, this is the abbreviation of LOOPBACK.

In another place in the document, there is an example of reading by line, which uses the above URL.In fact, this example can be used directly as a test example for a simple module test.Next, transcribe the code to do a test.

An error occurred in my test environment, I tried to make some changes to the code.

Remove this part directly.After that, the effect of the test:

The test passed, but this actually means that there is no interactive information of the serial port.In fact, I can try to modify the above content again to see how the serial port information can be obtained.


This is the modified code and the effect of running. The interactive information of the serial port can be seen initially.However, this test feels that the execution speed is not very fast in my test environment, and the reason for this has not been found for the time being.
边栏推荐
- Let's talk about what SaaS is, and the problems encountered...
- 小程序npm包--API Promise化
- QT(39)-vs development qt program prompts that the source file cannot be opened
- Image stitching (registration) case based on OpenCV
- Android Studio implements login registration - source code (connecting to MySql database)
- 软件测试员必看!数据库知识mysql查询语句大全
- DAY17:弱口令的探测与测试
- Web page element parsing a tag
- 成为一个合格的网安,你知道这些吗?
- Introduction to Thymeleaf
猜你喜欢

A brief introduction to the SSM framework

Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction

How with Mexico Volkswagen VW EDI connection to Mexico

How does MySql find out the latest data row that meets the conditions?

Building and sharing the root of the digital world: Alibaba Cloud builds a comprehensive cloud-native open source ecosystem

三、依赖配置管理

Predictive maintenance scheduling of multiple power equipment based on data-driven fault prediction

山西省第二届网络安全技能大赛(企业组)部分赛题WP(七)

Six, read application configuration + log configuration

DAY17:弱口令的探测与测试
随机推荐
The Double Pointer Problem (Part 2)
Code readability, pre-checks, comments and summaries
Shi Xingguo, founder of Hyperchain, was interviewed by 21st Century Business Herald to interpret Shanghai's new NFT regulations and digital development
mysql隔离级别
How does MySql find out the latest data row that meets the conditions?
LeetCode Algorithm 2326. 螺旋矩阵 IV
nSoftware.PowerShell.Server.2020
Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
Go study notes (84) - Go project directory structure
Dynamic Programming Problems (End)
A must see for software testers!Database knowledge MySQL query statement Daquan
解决go环境编译不了exe
2.4 hill sorting
Naive Bayes Classification
cnpm installation steps
My first experience of Go+ language——Blessing message system, so that she can also feel your blessings
Introduction to Thymeleaf
[Redis Master Cultivation Road] Jedis - the basic use of Jedis
Six, read application configuration + log configuration
DAY17、CSRF 漏洞