Merci pour ton aide,
Je vais mettre le code au complet, je pense qu'il y a de toute façon un problème, car je n'arrive pas à compiler...
#include <Wire.h>
#include "RTClib.h"
#include <LiquidCrystal.h>
RTC_DS1307 RTC;
const int relais=3;
//const int inter=4;
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup() {
// set up LCD indication nb colonne et case:
lcd.begin(16, 2);
lcd.clear();
delay(10);
// Print a message to the LCD.
lcd.setCursor(2,0);
lcd.print("Mon");
lcd.setCursor(2,1);
lcd.print("programme");
delay(2000);
lcd.clear();
delay (10);
pinMode (relais, OUTPUT);
Serial.begin(57600);
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__));
}
}
// RTC.adjust(DateTime(__DATE__, __TIME__));
void loop() {
//digitalWrite (relay,LOW);
// RTC.adjust(DateTime(__DATE__, __TIME__));
DateTime now = RTC.now();
lcd.home ();
lcd.print (now.day(),DEC);
lcd.print("/");
lcd.print (now.month(),DEC);
lcd.print("/");
lcd.print (now.year(),DEC);
lcd.print(" ");
lcd.print (now.hour(),DEC);
lcd.print(":");
lcd.print(now.minute(), DEC);
//lcd.print(":");
//lcd.print(now.second(), DEC);
// programme
if (hour() == 14 && minute() == 28) {
digitalWrite (relais,HIGH);
lcd.setCursor(0,1);
lcd.print("déclenche action1");
}