i2c project; started on UNO and switched to MEGA; not working anymore

Hi Pylon,

thanks for offering help. I found the root cause (although not understanding it).
I was using SHT2x lib (github) and it was working for SDP6xx sensors after some modifications.
After switching from UNO-R3 to Mega the same code stopped working (I was aware of the different pins for i2c...)
After replacing following lines with the delay(100) it worked:

delay(100); //new; replacing "digitalRead(18)", which is not working on MEGA
/*wait for measurement to complete.
timeout= millis()+300;
while (!digitalRead(18)) {
if (millis()>timeout) {
return 0;
}
} //end wait digitalread
*/
I guess the code was checking the ACK-bit but I´m not sure..

Thanks a lot,
Barny