Have this "small" program.
HAve made a lot og buffer to send different command over my serialport.
But when i need to send ex time and date. and need som variables in my buffer.
Code
Dim buffer24 As Byte() = {&H0, &H20, &H4, &HFF}
SerialPort1.Write(buffer24, 0, 4)
'But i now need to send time and date. and that changes ;)
NewTime = Now.ToString("HH") ' TEST
bufferTime = {&H0, &H0, NewTime,"mm", "dd","MM","yy", &HFF} 'TEST
SerialPort1.Write(bufferTime, 0, 8)
'Format i need to send is 08 00 "hour" "Minut" "day" "Month" "year 2 digits" FF
First block = 08 = Numbers of bytes.
Second Block= 00 = Group number in reciever.
3. Block = Hour
4. Bloxk = Minut
5. Block = Day
6. Block = Month
7. Block = Year in 2 digits.
8. Block = End command FF
What I have tried:
Need help to be able to add the variables to buffer,
Can add it, but it is in normal integer, need HEX.
ex 14 is 0E and NOT 14 to be send.