%% Select Bluetooth BR/EDR Channel Index for Connection Adaptive Frequency Hopping Sequence
% Create a Bluetooth BR/EDR channel index object for frequency hopping, specifying frequency hopping sequence type, Bluetooth BR/EDR device address, and used channels.

fh = bluetoothFrequencyHop('SequenceType','Connection adaptive', ...
    'DeviceAddress','2A96EF25','UsedChannels',22:78)

% Specify a clock value.

inputClock = '12C'; % 28-bit

% Select a Bluetooth BR/EDR channel index to hop for next frequency.

[channelIndex, X] = nextHop(fh, inputClock)

% Copyright 2020 The MathWorks, Inc.
%