I understand the read function reads a byte,
...but returns an int.
I found a code, which works, but
I'm not going to show you all of it.
(byte*)&val
Take the address of "val" using the & operator (making a pointer to int) and cast the result to be a pointer to byte.