def METHOD_NAME(self, command, set_amount=None, custom_cmd=None):
    """
    Determine and send the correct command to an Atlas Scientific sensor,
    based on the board version
    """
    # Formulate command based on calibration step and board version.
    # Legacy boards requires a different command than recent boards.
    # Some commands are not necessary for recent boards and will not
    # generate a response.
    err = 1
    msg = "Default message"
    if self.init_error:
        msg = self.init_error
    # Atlas EC
    if command == 'ec_dry':
        if self.board_version >= 2:
            err, msg = self.send_command('cal,dry')
    elif command == 'ec_low':
        if self.board_version >= 2:
            err, msg = self.send_command(f'cal,low,{set_amount}')
    elif command == 'ec_high':
        if self.board_version >= 2:
            err, msg = self.send_command(f'cal,high,{set_amount}')
    # Atlas pH
    elif command == 'temperature' and set_amount is not None:
        if self.board_version == 1:
            err, msg = self.send_command(set_amount)
        elif self.board_version >= 2:
            err, msg = self.send_command(f'T,{set_amount:.2f}')
    elif command == 'clear_calibration':
        if self.board_version == 1:
            err, msg = self.send_command('X')
            self.send_command('L0')
        elif self.board_version >= 2:
            err, msg = self.send_command('Cal,clear')
    elif command == 'continuous':
        if self.board_version == 1:
            err, msg = self.send_command('C')
        elif self.board_version >= 2:
            err, msg = self.send_command('C,1')
    elif command == 'low':
        if self.board_version == 1:
            err, msg = self.send_command('F')
        elif self.board_version >= 2:
            err, msg = self.send_command('Cal,low,4.00')
    elif command == 'mid':
        if self.board_version == 1:
            err, msg = self.send_command('S')
        elif self.board_version >= 2:
            err, msg = self.send_command('Cal,mid,7.00')
    elif command == 'high':
        if self.board_version == 1:
            err, msg = self.send_command('T')
        elif self.board_version >= 2:
            err, msg = self.send_command('Cal,high,10.00')
    elif command == 'calibrated':  # Not implemented. This queries whether there is a stored calibration
        if self.board_version == 1:
            err = 'success'
            msg = 'Calibrated query not implemented on board version 1 (assume it was successfully calibrated)'
        elif self.board_version >= 2:
            err, msg = self.send_command('Cal,?')
    elif command == 'end':
        if self.board_version == 1:
            err, msg = self.send_command('E')
        elif self.board_version >= 2:
            err, msg = self.send_command('C,0')
    elif custom_cmd:
        err, msg = self.send_command(custom_cmd)
    return err, msg