def receive(self,arg_formats=None):
        msg = [[]]
        raw_msg = []
        escaped = False
        command_sep_found = False
        while True:
            tmp = self.board.read()
            raw_msg.append(tmp)
            if escaped:
                if tmp in self._escaped_characters:
                    msg[-1].append(tmp)
                    escaped = False
                else:
                    msg[-1].append(self._byte_escape_sep)
                    msg[-1].append(tmp)
                    escaped = False
            else:
                if tmp == self._byte_escape_sep:
                    escaped = True
                elif tmp == self._byte_field_sep:
                    msg.append([])
                elif tmp == self._byte_command_sep:
                    command_sep_found = True
                    break
                elif tmp == b'':
                    break
                else:
                    msg[-1].append(tmp)
        if len(msg) == 1 and len(msg[0]) == 0:
            return None
        if not command_sep_found:
            joined_raw = b''.join(raw_msg) 
            if joined_raw.strip() == b'':
                return  None
            err = "Incomplete message ({})".format(joined_raw.decode())
            raise EOFError(err)
        fields = [b''.join(m) for m in msg]
        cmd = fields[0].strip().decode()
        try:
            cmd_name = self._int_to_cmd_name[int(cmd)]
        except (ValueError,IndexError):
            if self.give_warnings:
                cmd_name = "unknown"
                w = "Recieved unrecognized command ({}).".format(cmd)
                warnings.warn(w,Warning)
        arg_format_list = []
        if arg_formats != None:
            arg_format_list = list(arg_formats)
        else:
            try:
                arg_format_list = self._cmd_name_to_format[cmd_name]
            except KeyError:
                arg_format_list = ["g" for i in range(len(fields[1:]))]
        arg_format_list = self._treat_star_format(arg_format_list,fields[1:])
        if len(fields[1:]) > 0:
            if len(arg_format_list) != len(fields[1:]):
                err = "Number of argument formats must match the number of recieved arguments."
                raise ValueError(err)
        received = []
        for i, f in enumerate(fields[1:]):
            received.append(self._recv_methods[arg_format_list[i]](f))
        message_time = time.time()
        return cmd_name, received, message_time