Problem mit Zeitsteuerung - achtung Anfänger ;-)

Hallo erstmal,

ich habe ein ähnliches Problem.

Und zwar möchte ich mit dem RTC DS3234 Modul erreichen zu bestimmten Zeiten eine LED zum Leuchten zu bringen.
Aber ich habe keine Ahnung wie ich das bewerkstelligen soll. Ich kann zwarr mittlererweile die Zeit anzeigen lassen (im Serial Monitor) aber ich weiß nicht wie ich da was einfügen soll.
Ich hätte an eine If abfrage gedacht aber so einfach ist das dann doch nicht weil ich nicht weiß nach was die fragen soll.

Vielen Dank schon mal im Voraus.

#include <SPI.h>
const int cs=10; //chip select

void setup() {
Serial.begin(9600);
RTC_init();
//day(1-31), month(1-12), year(0-99), hour(0-23), minute(0-59), second(0-59)
SetTimeDate(11,12,13,14,15,16);
}

void loop() {
Serial.println(ReadTimeDate());
delay(1000);
}
//=====================================
int RTC_init(){
pinMode(cs,OUTPUT); // chip select
// start the SPI library:
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE1); // both mode 1 & 3 should work
//set control register
digitalWrite(cs, LOW);
SPI.transfer(0x8E);
SPI.transfer(0x60); //60= disable Osciallator and Battery SQ wave @1hz, temp compensation, Alarms disabled
digitalWrite(cs, HIGH);
delay(10);
}
//=====================================
int SetTimeDate(int d, int mo, int y, int h, int mi, int s){
int TimeDate [7]={s,mi,h,0,d,mo,y};
for(int i=0; i<=6;i++){
if(i==3)
i++;
int b= TimeDate*/10;*
int a= TimeDate_-b10;_
_
if(i==2){_
_
if (b==2)_
_
b=B00000010;_
_
else if (b==1)_
_
b=B00000001;_
_
} _
_ TimeDate= a+(b<<4);*_

* digitalWrite(cs, LOW);*
* SPI.transfer(i+0x80);*
_ SPI.transfer(TimeDate*);
digitalWrite(cs, HIGH);
}
}
//=====================================
String ReadTimeDate(){
String temp;
int TimeDate [7]; //second,minute,hour,null,day,month,year
for(int i=0; i<=6;i++){
if(i==3)
i++;
digitalWrite(cs, LOW);
SPI.transfer(i+0x00);
unsigned int n = SPI.transfer(0x00);
digitalWrite(cs, HIGH);
int a=n & B00001111;
if(i==2){
int b=(n & B00110000)>>4; //24 hour mode*

* if(b==B00000010)
b=20;
else if(b==B00000001)
b=10;
TimeDate=a+b;
}
else if(i==4){
int b=(n & B00110000)>>4;
TimeDate=a+b10;

* }
else if(i==5){
int b=(n & B00010000)>>4;
TimeDate=a+b10;

* }
else if(i==6){
int b=(n & B11110000)>>4;
TimeDate=a+b10;

* }
else{
int b=(n & B01110000)>>4;
TimeDate=a+b10;

* }
}
temp.concat(TimeDate[4]);
temp.concat("/") ;
temp.concat(TimeDate[5]);
temp.concat("/") ;
temp.concat(TimeDate[6]);
temp.concat(" ") ;
temp.concat(TimeDate[2]);
temp.concat(":") ;
temp.concat(TimeDate[1]);
temp.concat(":") ;
temp.concat(TimeDate[0]);
return(temp);
}
[/quote]*

Das ist mein bisheriger Code ^^_