Raspberry Pi - Serial UART Communication
What will be the output of this code snippet if the serial device sends the bytes
b'OK'?
import serial
ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
response = ser.read(2)
print(response)
ser.close()