Just to update this I ended up using the Wire library and changed the commands to be suitable for that library to get the sensor to work.