encender rele segun tiempo

hola no llego a comprenderlo.
visita esta web. es mia, di de baja el dominio y se ha quedao pillada.
hay hay un ejemplo de un reloj.
te dejo un ejemplo. que muestra la hora por el serial de tu pc.

//
// CONTROLADOR ACUARIO V2.0

//FASE 1 - RELOJ

//////////////////////////////////////////////////////////////////////////7

#include <Wire.h> // Esta es la libreria de comunicacion I2C
#define DS1307_I2C_ADDRESS 0x68

// Convierte números normales decimales a BCD (binario decimal codificado)
byte decToBcd(byte val)
{
return ( (val/10*16) + (val%10) );
}

// Convierte BCD (binario decimal codificado) a números normales decimales
byte bcdToDec(byte val)
{
return ( (val/16*10) + (val%16) );
}

// 1) Sets the date and time on the ds1307
// 2) Starts the clock
// 3) Sets hour mode to 24 hour clock

void setDateDs1307(byte second, // 0-59
byte minute, // 0-59
byte hour, // 1-23
byte dayOfWeek, // 1-7
byte dayOfMonth, // 1-28/29/30/31
byte month, // 1-12
byte year) // 0-99
{
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.send(decToBcd(second));
Wire.send(decToBcd(minute));
Wire.send(decToBcd(hour));
Wire.send(decToBcd(dayOfWeek));
Wire.send(decToBcd(dayOfMonth));
Wire.send(decToBcd(month));
Wire.send(decToBcd(year));
Wire.endTransmission();
}

// Establece la fecha y la hora del reloj
void getDateDs1307(byte *second,
byte *minute,
byte *hour,
byte *dayOfWeek,
byte *dayOfMonth,
byte *month,
byte *year)
{
// Resetea el registro puntero
Wire.beginTransmission(DS1307_I2C_ADDRESS);
Wire.send(0);
Wire.endTransmission();

Wire.requestFrom(DS1307_I2C_ADDRESS, 7);

// Alguno de estos necesitan enmascarar porque ciertos bits son bits de control

*second = bcdToDec(Wire.receive() & 0x7f);
*minute = bcdToDec(Wire.receive());
*hour = bcdToDec(Wire.receive() & 0x3f);
*dayOfWeek = bcdToDec(Wire.receive());
*dayOfMonth = bcdToDec(Wire.receive());
*month = bcdToDec(Wire.receive());
*year = bcdToDec(Wire.receive());
}

void setup()
{
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;
Wire.begin();
Serial.begin(9600);
Serial.print("serial inicializado");

// la primera vez debemos poner en hora, active esta parte y luego vuelva a quitarla
/*second = 00;
minute = 15;
hour = 21;
dayOfWeek = 6;
dayOfMonth = 19;
month = 9;
year = 9;

setDateDs1307(second, minute, hour, dayOfWeek, dayOfMonth, month, year);
*/}

void loop()
{
// Serial.print("hola mundo");
byte second, minute, hour, dayOfWeek, dayOfMonth, month, year;

getDateDs1307(&second, &minute, &hour, &dayOfWeek, &dayOfMonth, &month, &year);

Serial.print("20");
if (year < 10) Serial.print("0");
Serial.print(year, DEC);
Serial.print("/");
if (month < 10) Serial.print("0");
Serial.print(month, DEC);
Serial.print("/");
if (dayOfMonth < 10) Serial.print("0");
Serial.print(dayOfMonth, DEC);
Serial.print(" ");
if (hour < 10) Serial.print("0");
Serial.print(hour, DEC);
Serial.print(":");
if (minute < 10) Serial.print("0");
Serial.print(minute, DEC);
Serial.print(":");
if (second < 10) Serial.print("0");
Serial.print(second, DEC);
Serial.print(" Dia de la semana:");
Serial.println(dayOfWeek, DEC);
switch (dayOfWeek)
{
case 1:
Serial.println(" Lunes");
break;
case 2:
Serial.println(" Martes");
break;
case 3:
Serial.println(" Miercoles");
break;
case 4:
Serial.println(" Jueves");
break;
case 5:
Serial.println(" Viernes");
break;
case 6:
Serial.println(" Sabado");
break;
case 7:
Serial.println(" Domingo");
break;
}

delay(1000); //Pausa durante 1 segundo
}

carga esto y dime que te sale.
pd: no he conteatado antes por problemas familiares :wink:

Perdon por no contestar antes. Espero que se hayan solucionado.

Esta tarde si tengo tiempo, espero, lo cargo y te cuento

Gracias