Added WaitForAck function

Add a function to wait for an ACK from an I2C device.