Answers for "pyserial example code"

0

pyserial example code

>>> import serial
>>> ser = serial.Serial('/dev/ttyUSB0')  # open serial port
>>> print(ser.name)         # check which port was really used
>>> ser.write(b'hello')     # write a string
>>> ser.close()             # close port
Posted by: Guest on May-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language