Created shared functions to convert NSData to integers for use when converting data for bluetooth sending/recieving