Python / PySerial / Arduino Reading serial data and later writing this exact serial data to the txt file
问题 I am making a new post regarding this case because I was misunderstood in the first one... I have a code that reads the serial data from the Arduino and when some specific digits are pressed on the keyboard it writes these digits to the Arduino. This exact code works perfectly when I run it , it reads the serial data and I am able to write data to the Arduino. I use threading and PySerial library to achieve this. from pynput import keyboard import threading import serial import sys ser = None