Change int to uint8_t

Useful for arduino as 8-bit values are faster to work with than the 16-bit integer the compiler uses as default.

https://stackoverflow.com/questions/10457210/arduino-uint8-t-variables/10815946#10815946
http://www.cplusplus.com/reference/cstdint/