I am running the following code in python. The Microcontroller is connected to the USB UART COM 7. I am sending the character “S” from python to Microcontroller and I expect a line from Microcontroller but there is nothing on the python shell. I am not sure if I am sending it properly or not and whether I am reading the line from Microcontroller the right way or not.
import serial ser = serial.Serial("COM7", 9600) # Send character 'S' to start the program ser.write(bytearray('S','ascii')) # Read line while True: bs = ser.readline() print(bs)