Hello my project sends data from the Arduino to Python so that python does an action when a certain value has been read from the serial.
The Arduino sends a
Then Python interprets it with
import serial import time import pyautogui import keyboard from pynput import mouse from pynput.mouse import Button, Controller arduino = serial.Serial(port='COM3', baudrate=9600, timeout=.01) def issensed(): data = arduino.readline() return data while (True): value = str(issensed()) if value == "s": pyautogui.typewrite("hi") else: pyautogui.typewrite("no")
However hi is not being written and no is not being written.
Any help would be much appreciated