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