You are here: Forum Home → ANT+ Forums → ANT+ Bike Speed and Cadence Devices → Thread
#CREATE CHANNEL TO RECEIVE SPEED AND CADENCE DATA (SLAVE)--------------------------------
Dim SAC1_Channel As ANT_Channel = ANTDevice_0.getChannel(1)
SAC1_Channel.assignChannel(User_ANT_Channel, UCNetNUm) #ANT CHANNEL SET FOR SLAVE
SAC1_Channel.setChannelID(56463, False, 121, 0) #DEVICE NUM is 56463, 121 is DEVICE TYPE FOR SAC,
SAC1_Channel.setChannelPeriod(8086) #PERIOD FROM SAC DEVICE PROFILE
SAC1_Channel.setChannelFreq(ucRF) #ucRF = 57
SAC1_Channel.openChannel()
#CREATE ANT CHANNEL TO SEND SPEED AND CADENCE DATA FROM SENSOR (MASTER)
Dim SC_Transmit_ChannelNum As Byte = ANT_ReferenceLibrary.ChannelType.BASE_Master_Transmit_0x10
Dim SC_transmit_channel As ANT_Channel = ANTDevice_0.getChannel(0)
Dim SCtranstype As Byte = (1) #TRANS TYPE = 1 PER SAC DEVICE PROFILE
SC_transmit_channel.assignChannel(SC_Transmit_ChannelNum, UCNetNUm) #SET TO MASTER CHANNEL
SC_transmit_channel.setChannelID(56463, False, 121, SCtranstype) #56463 is Ben's COMBINED S&C Sensor
SC_transmit_channel.setChannelPeriod(8086)
SC_transmit_channel.setChannelFreq(ucRF)
SC_transmit_channel.openChannel()
AddHandler SAC1_Channel.channelResponse, AddressOf HandleSC #HANDLER TO RECEIVE DATA
Dim SC_transmit_channel As ANT_Channel = ANTDevice_0.getChannel(0)
Dim SC_transmit_channel As ANT_Channel = ANTDevice_0.getChannel(1)