python/GUI/gui.py
def read_serial_data(self):
        """
        Reads bytes from serial port and returns the package
        """
        
        ports = serial.tools.list_ports.comports()
        serialInst = serial.Serial()

        portList = []

        for onePort in ports:
            portList.append(str(onePort))
            print (str(onePort))

        val = input ("select Port :") 

        for x in range (0,len(portList)):
            if portList[x].startsswith("" + str(val)):
                portVar = ""  + str(val)
                print(portList[x])

        serialInst.baudrate = 9600
        serialInst.port = portVar
        serialInst.open()

        while True:
            if serialInst.in_waiting:
                packet = serialInst.readline()
                print(packet.decode('utf' ).rstrip('\n'))
        return packet

        Reads bytes from serial port and returns the package
        
Reads bytes from serial port and returns the package
Reads bytes from serial port and returns the package
def read_serial_data(self):
        ports = serial.tools.list_ports.comports()
        serialInst = serial.Serial()
        portList = []
        for onePort in ports:
            portList.append(str(onePort))
            print (str(onePort))
        val = input ("select Port :") 
        for x in range (0,len(portList)):
            if portList[x].startsswith("" + str(val)):
                portVar = ""  + str(val)
                print(portList[x])
        serialInst.baudrate = 9600
        serialInst.port = portVar
        serialInst.open()
        while True:
            if serialInst.in_waiting:
                packet = serialInst.readline()
                print(packet.decode('utf' ).rstrip('\n'))
        return packet
def read_serial_data ( self ) : ports = serial . tools . list_ports . comports ( ) serialInst = serial . Serial ( ) portList = [ ] for onePort in ports : portList . append ( str ( onePort ) ) print ( str ( onePort ) ) val = input ( "select Port :" ) for x in range ( 0 , len ( portList ) ) : if portList [ x ] . startsswith ( "" + str ( val ) ) : portVar = "" + str ( val ) print ( portList [ x ] ) serialInst . baudrate = 9600 serialInst . port = portVar serialInst . open ( ) while True : if serialInst . in_waiting : packet = serialInst . readline ( ) print ( packet . decode ( 'utf' ) . rstrip ( '\n' ) ) return packet
Reads bytes from serial port and returns the package
Reads bytes from serial port and returns the package
"""
        Reads bytes from serial port and returns the package
        """
self