I2C on explorer 16 board not working
The documentation for OpenI2Cx() says that it configures the I2C control register and the I2C baud rate generator. You still need to set up the GPIO lines themselves.

What I did in my PIC24 I2C application is:


Configure PPS (may not be necessary for you)
Disable ADC on the I2C lines
Set the TRIS registers on the I2C lines as inputs