I want to send a number to the COM port every second.I created a pair of ports (COM3 and COM4) using the com0com program
It then tries to send the number 21 to the COM4 port.
Type "help", "copyright", "credits" or "license" for more information.>>> import serial>>> ser= serial.Serial('COM4', 9600, timeout=1)>>> ser.write(21)but the operation hangs, does anyone know why this happens?I'm definitely doing something wrong.Maybe someone knows what needs to be done to make it work.