Impostare l'ora con DS1307 AT24C32

Ciao a tutti,

Non riesco a capire come impostare la data e l'ora con il mio DS1307 AT24C32.
E' collegato con SDA in A4 e SCL in A5, 5V e GND.

Nonostante la presenza della riga
RTC.adjust(DateTime(DATE, TIME));
non si imposta l'ora e la data, mi da 03 novembre 2012, ore 21.30 non capisco.
l'ora va avanti senza problemi è solo che vorrei impostare l'ora e la data attuale ma non capisco come fare, avevo capito che la riga sopra service a sincronizzarlo con la data e l'ora dal computer ma niente.

// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
 
#include <Wire.h>
#include "RTClib.h"
 
RTC_DS1307 RTC;
 
void setup () {
    Serial.begin(9600);
    Wire.begin();
    RTC.begin();
 
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
}
 
void loop () {
    DateTime now = RTC.now();
     
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
     
    Serial.print(" since midnight 1/1/1970 = ");
    Serial.print(now.unixtime());
    Serial.print("s = ");
    Serial.print(now.unixtime() / 86400L);
    Serial.println("d");
     
    // calculate a date which is 7 days and 30 seconds into the future
    DateTime future (now.unixtime() + 7 * 86400L + 30);
     
    Serial.print(" now + 7d + 30s: ");
    Serial.print(future.year(), DEC);
    Serial.print('/');
    Serial.print(future.month(), DEC);
    Serial.print('/');
    Serial.print(future.day(), DEC);
    Serial.print(' ');
    Serial.print(future.hour(), DEC);
    Serial.print(':');
    Serial.print(future.minute(), DEC);
    Serial.print(':');
    Serial.print(future.second(), DEC);
    Serial.println();
     
    Serial.println();
    delay(3000);
}

Carica questo sketch --> RTC1307 - Real Time Clock - Combustory
Puoi inviare all'Arduino la programmazione del RTC con

RTC_DS1307_v.01 User Guide
Not much to say here, I tend to use the Arduino in the Arduino Communications Method, so maybe someday I will present the other part of the controlling SW I made for this tool, but I will have to make changes to get it to work correctly for this particular set-up.
For now just enter the commands from the Arduino Environment or your favorite serial communications method.
Commands
Note: Commands are NOT case sensitive. T or t will work.
T(00-59)(00-59)(00-23)(1-7)(01-31)(01-12)(00-99) - T(sec)(min)(hour)(dayOfWeek)(dayOfMonth)(month)(year) - T Sets the date of the RTC DS1307 Chip.
Example to set the time for 25-Jan-2012 @ 19:57:11 for the 4 day of the week, use this command - T1157194250112
Q1 - This command will initialize all the non date/time memory to 255 (0xff)
I do this because when the RTC DS1307 goes into back up mode it returns 0 for any register, so for memory usage a 0 will be considered a failure to read memory and 255 will be a default value. Meaning it is considered null.
Q2 - This command will Dump all 64 registers to the serial buffer
R - Read/display the time, day and date

Oppure usare questo programma su Winodws --> >Set the time on your DS1307 with the Arduino | gadjetsblog

Grazie mille per la risposta, ora guarda in dettaglio!