File ”C:\Users\username\Desktop\fgh.py“, line 12, in <module>
x=int(x)
ValueError: invalid literal for int() with base 10: ”b'0"
Вот сам код:
import pyautogui, sys import time import serial ArduinoSerial=serial.Serial('com4',9600) time.sleep(1) while 1: data=str(ArduinoSerial.readline()) (x,y,z)=data.split(":") (X,Y)=pyautogui.position() x=int(x) y=int(y) pyautogui.moveTo(X+x,Y-y) if '1' in z: pyautogui.click(button="left")