Casting data types in i2c code

Woops, my bad! Thanks, I've edited my post.