假串
用python虚拟串口
⽤python虚拟串⼝在linux下调试串⼝程序,⽆奈下⾯的硬件还没到位,所以,想着⾃⼰模拟⼀个串⼝⽤⽤。试了下下⾯这段代码:#!/usr/bin/env python#coding=utf-8import ptyimport osimport selectdef mkpty():#Open a new ttymaster1, slave = pty.openpty()python怎么读取串口数据...
⽤python虚拟串⼝在linux下调试串⼝程序,⽆奈下⾯的硬件还没到位,所以,想着⾃⼰模拟⼀个串⼝⽤⽤。试了下下⾯这段代码:#!/usr/bin/env python#coding=utf-8import ptyimport osimport selectdef mkpty():#Open a new ttymaster1, slave = pty.openpty()python怎么读取串口数据...