tp0
This commit is contained in:
parent
cdb9dc2121
commit
40a6a58e72
10
tp0/python/Lecture_portcom.py
Normal file
10
tp0/python/Lecture_portcom.py
Normal file
@ -0,0 +1,10 @@
|
||||
import serial as s
|
||||
ser=s.Serial()
|
||||
ser.baudrate = 9600
|
||||
ser.port = "COM4"
|
||||
ser.timeout=10
|
||||
|
||||
ser.open()
|
||||
x=ser.readline()
|
||||
print(x)
|
||||
ser.close()
|
Loading…
x
Reference in New Issue
Block a user