代码如下:
if uart1.any(): x_error = int(uart1.readline().decode()) print(x_error)
提供全部的代码。
还有`接收到的数据会打印在一行`的截图。