Hi all,
I'm stuggling with converting an int to a byte to use with async streams, I tried various things from the ByteConverter library without success.
I'm writing an array of bytes to astreams like this:-
AStreams.Write(Array As Byte (0x02, 0x4B, keycode, 0x03, 0x0D))
But keycode is an int eg (17 or 0x11) and I guess I need to convert it to a byte, I've tried using Conv.IntstoBytes, also tried converting it to a hex string, I'm sure this is quite simple, anyone help please?
TIA
I'm stuggling with converting an int to a byte to use with async streams, I tried various things from the ByteConverter library without success.
I'm writing an array of bytes to astreams like this:-
AStreams.Write(Array As Byte (0x02, 0x4B, keycode, 0x03, 0x0D))
But keycode is an int eg (17 or 0x11) and I guess I need to convert it to a byte, I've tried using Conv.IntstoBytes, also tried converting it to a hex string, I'm sure this is quite simple, anyone help please?
TIA