|
I have been using a VB program to control my IR devices, and it has worked fine. I've added a few devices, and now I realize my program can not handle sending anything higher than 255.
Can I modify this to send higher codes, or program code examples of how to do it another way.
Here is my present code:
Dim tempstring(8) As Byte Dim tempstring2(8) As Byte Dim tempstring3(8) As Byte Dim tempstring4(8) As Byte Dim number As Integer
number = Val(irin)
tempstring(0) = 200 tempstring(1) = 90 tempstring(2) = number tempstring(3) = 0 tempstring(4) = 0 tempstring(5) = 0 tempstring(6) = 0
tempstring(7) = CheckSum(tempstring, 7)
Form1.MSComm1.Output = tempstring
Private Function CheckSum(ByRef Buffer() As Byte, Size As Byte) As Byte Dim i, CSum CSum = 0 For i = 0 To Size CSum = CSum + Buffer(i) Next CheckSum = CSum Mod 256 End Function
Thanks for any help you can give!
Mark
|