feat(数电课设): 屏幕部分完善
This commit is contained in:
parent
a74ee5d5d6
commit
7fdcd7c4fc
2 changed files with 12 additions and 0 deletions
12
Quartus/UART_screen/s.py
Normal file
12
Quartus/UART_screen/s.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import serial
|
||||||
|
try:
|
||||||
|
ser = serial.Serial('COM4', 9600,timeout=None)
|
||||||
|
except:
|
||||||
|
print("Serial port not found")
|
||||||
|
exit()
|
||||||
|
|
||||||
|
ser.write("p0.pic=0".encode("gb2312"))
|
||||||
|
ser.write(b'\xFF\xFF\xFF')
|
||||||
|
|
||||||
|
ser.write("g0.txt=\"喜迎二十大,永远跟党走,奋进新征程.\"".encode("gb2312"))
|
||||||
|
ser.write(b'\xFF\xFF\xFF')
|
Binary file not shown.
Reference in a new issue