pycom/lib/rcio.py
def rc_read_write(conn, rc_write):
    """
    get/send new RC data from UART
    """

    try:
        i = str(rc_write)[1:-1].replace(" ", "") + "\n"
        conn.write(i.encode())    # definitly not great performance
        rc_read = conn.readline().decode() # example: "0@500@500@0@500@992@\n"
        return list(map(int,rc_read.split('@')[:-1]))

    except Exception as e:
        print("exception in rc_read_write: {}".format(e))
        return [0,0,0,0,0,0]

    get/send new RC data from UART
    
get/send new RC data from UART
get / send new RC data from UART
def rc_read_write(conn, rc_write):
    try:
        i = str(rc_write)[1:-1].replace(" ", "") + "\n"
        conn.write(i.encode())    
        rc_read = conn.readline().decode() 
        return list(map(int,rc_read.split('@')[:-1]))
    except Exception as e:
        print("exception in rc_read_write: {}".format(e))
        return [0,0,0,0,0,0]
def rc_read_write ( conn , rc_write ) : try : i = str ( rc_write ) [ 1 : - 1 ] . replace ( " " , "" ) + "\n" conn . write ( i . encode ( ) ) rc_read = conn . readline ( ) . decode ( ) return list ( map ( int , rc_read . split ( '@' ) [ : - 1 ] ) ) except Exception as e : print ( "exception in rc_read_write: {}" . format ( e ) ) return [ 0 , 0 , 0 , 0 , 0 , 0 ]
get/send new RC data from UART
get / send new RC data from UART
"""
    get/send new RC data from UART
    """ # definitly not great performance # example: "0@500@500@0@500@992@\n"
conn
rc_write