For a I2C bus, connect the SDA, SCL and GND wires.
The next thing to do is to run a I2C Scanner sketch.
Here is one: https://learn.adafruit.com/scanning-i2c-addresses/arduino.
Or in the menu of the Arduino IDE as DrDiettrich wrote in reply #14.
Arduino IDE, menu: File / Examples / Wire / i2c_scanner
It is useless to try other code or try to fix the code if you have not run a I2C Scanner sketch.