It does basically the following:
Write in the DS1307 for setting the clock in the time you wish and start counting (logic 0 to bit7 of first register)
Wire.beginTransmission(0x68);
Wire.write(0);
Wire.write(0b00001000);
Wire.write(0b00001000);
Wire.write(0b00001000);
Wire.write(0b00000001);
Wire.write(0b00000001);
Wire.write(0b00000001);
Wire.write(0b00000001);
Wire.write(0b10000000);
Wire.endTransmission();
}
and them I read this registers I just wrote:
Wire.beginTransmission(0x68);
Wire.write(0);
Wire.endTransmission();
*/
Wire.requestFrom(0x68,7);
ss = Wire.read();
mm = Wire.read();
hh = Wire.read();
a = Wire.read();
b = Wire.read();
c = Wire.read();
d = Wire.read();
and print them in the serial monitor...
As it is a RTC enabled, i should get the updated time each time the loop function restarts.