Dim IrdaHelper1 As IrdaHelper
Dim Initialized As Boolean=IrdaHelper1.Initialize
If Initialized Then
Log("Able to transmit IR codes")
Select IrdaHelper1.GetIrdaHelperState
Case IrdaHelper1.STATE_CONSUMER_IR_MANAGER
Log("The ConsumerIrManager is initialized")
' you can get the instance of ConsumerIrManager using IrdaHelper1.GetConsumerIrManager
Case IrdaHelper1.STATE_IRDA_MANAGER
Log("The Samsung IrdaManager is initialized")
' you can get the instance of IrdaManager using IrdaHelper1.GetIrdaManager
Case IrdaHelper1.STATE_NOT_INITIALIZED
Log("Neither ConsumerIrManager or IrdaManager are initialized")
' this condition should not be met as IrdaHelper1.Initialize has returned True
End Select
' examples showing how we can transmit IR codes formatted as either:
' CarrierFrequency As Int, Pattern() As Int
' DecimalData As String
' HexData As String, Separator As String
IrdaHelper1.Transmit(IrdaHelper1.GetTransmitData(38028, Array As Int(169,168,21,63,21,63,21,63,21,21,21,21,21,21,21,21,21,21,21,63,21,63,21,63,21,21,21,21,21,21,21,21,21,21,21,21,21,63,21,21,21,21,21,21,21,21,21,21,21,21,21,64,21,21,21,63,21,63,21,63,21,63,21,63,21,63,21,1794,169,168,21,21,21,3694)))
IrdaHelper1.Transmit(IrdaHelper1.GetTransmitData2("38028,169,168,21,63,21,63,21,63,21,21,21,21,21,21,21,21,21,21,21,63,21,63,21,63,21,21,21,21,21,21,21,21,21,21,21,21,21,63,21,21,21,21,21,21,21,21,21,21,21,21,21,64,21,21,21,63,21,63,21,63,21,63,21,63,21,63,21,1794,169,168,21,21,21,3694"))
IrdaHelper1.Transmit(IrdaHelper1.GetTransmitData3("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e", " "))
Else
Log("Unable to transmit IR codes")
Log(IrdaHelper1.GetIrdaHelperState)
End If