B4R Question IR send and receive

Lee Ingram

Member
Licensed User
Longtime User
I am back after sever years. Forgot a lot.
i just want try this simple code.

Main - 13: Unknown type: irsend
Are you missing a library reference?
Unknown type: irsend
I
B4X:
Sub Process_Globals

    Public Serial1 As Serial

    Private irsend As IrSend

    Private timer1 As Timer

End Sub


Private Sub AppStart

    Serial1.Initialize(115200)

    Log("AppStart")

    irsend.Enable(38) 'frequency = 38khz

    timer1.Initialize("timer1_Tick", 500)

    timer1.Enabled = True

End Sub


Sub Timer1_Tick

    Dim m As UInt = Bit.And(Millis, 0xfff) 'get 12 bits

    Log("sending: ", m)

    irsend.SendRC5(m, 12)

End Sub
 

Johan Schoeman

Expert
Licensed User
Longtime User
Check If rIRremote is in the libs tab of your b4r IDE and click on it to enable it. If it is not there then find it in the B4R library forum, download it, and add it to your additional library folder
 
Upvote 0

Lee Ingram

Member
Licensed User
Longtime User
Check If rIRremote is in the libs tab of your b4r IDE and click on it to enable it. If it is not there then find it in the B4R library forum, download it, and add it to your additional library folder
WOW, thank you. I have been putting the library files in a wrong place.
 
Upvote 0
Top