| 
					
				 | 
			
			
				@@ -8,8 +8,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 #include "../lib/calsol.h" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-uint8_t SHIFT_NIGHT=45; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-uint8_t SHIFT_DAY=30; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+uint8_t SHIFT_NIGHT = 45; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+uint8_t SHIFT_DAY = 30; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // Module DS3231 pour l'heure 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 int gnd_rtc = 14; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -53,27 +53,24 @@ void setdate() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void settime() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	Serial.println("Set time format : 01:34 for example"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	char buffer[] = {' ',' ',' ',' ',' '}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	while (!Serial.available()); // Wait for characters 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 		Serial.readBytesUntil('\n', buffer, 5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setTime(18, 50, 00);     // Set the time to 12:00:00 (24hr format) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setDate(26, 6, 2019);   // Set the date to January 1st, 2014 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		int incomingValue = atoi(buffer); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		Serial.println(incomingValue); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		rtc.setTime(atoi(buffer[0])*10+buffer[1], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								atoi(buffer[3])*10+atoi(buffer[4]), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-								00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void read_time() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Time t; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	t = rtc.getTime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.println(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.print("=> Date : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.println(rtc.getDateStr()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.print("=> Heure : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.println(rtc.getTimeStr()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.println(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-void setRTC() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	rtc.setTime(25, 21, 00);     // Set the time to 12:00:00 (24hr format) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	rtc.setDate(25, 6, 2019);   // Set the date to January 1st, 2014 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -140,6 +137,11 @@ void clearSerial() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.print("[H");     // cursor to home command 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+void setRTC() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setTime(3, 36, 45);     // Set the time to 12:00:00 (24hr format) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	rtc.setDate(27, 6, 2019);   // Set the date to January 1st, 2014 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void selftest_func(void) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -153,8 +155,7 @@ void selftest_func(void) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("3. Read fin_course_ouverture"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("4. Detect position and switch position"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("5. Reset Arduino"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	Serial.println("6. Set Date"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	Serial.println("7. Set time"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	Serial.println("6. setRTC()"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("o. open door"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("c. close door"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	Serial.println("+. open door for 100ms"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -171,6 +172,7 @@ void selftest_func(void) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 case '1': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	 	Serial.println("Read Time"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		read_time(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		selftest_func(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case '2': 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -222,10 +224,8 @@ void selftest_func(void) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			asm volatile ("  jmp 0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case '6': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			setdate(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			setRTC(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	case '7': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			settime(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	case 'o': 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		ouvrirPorte(1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -281,6 +281,7 @@ void selftest_func(void) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void setup() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	// On dit que c'est des sorties 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	pinMode(motor_power, OUTPUT); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -322,6 +323,8 @@ void setup() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	//setRTC(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	bool read; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -372,23 +375,24 @@ void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				if (t.date == DateSol_t[i][2]) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					timestamp_time = ((float)i * 24 * 60) + ((float)t.hour * 60) + (float)t.min; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					timestamp_cal_matin = ((float)i * 24 * 60) + ((float)DateSol_t[i][3] * 60) + (float)DateSol_t[i][4] - SHIFT_DAY; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					timestamp_cal_soir = ((float)i * 24 * 60) + ((float)DateSol_t[i][5] * 60) + (float)DateSol_t[i][6] + SHIFT_NIGHT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					timestamp_cal_matin = ((float)i * 24 * 60) + ((float)DateSol_t[i][3] * 60) + (float)DateSol_t[i][4] - (float)SHIFT_DAY; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					timestamp_cal_soir = ((float)i * 24 * 60) + ((float)DateSol_t[i][5] * 60) + (float)DateSol_t[i][6] + (float)SHIFT_NIGHT; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					timestamp_minuit = ((float)i * 24 * 60); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					timestamp_2359 = ((float)i * 24 * 60) + (24 * 60) -1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					delay(200); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Serial.print("timestamp_time :"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Serial.print("timestamp_time :      "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(timestamp_time); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Serial.print("timestamp_minuit :"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Serial.print("timestamp_minuit :    "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(timestamp_minuit); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Serial.print("timestamp_cal_matin :"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Serial.print("timestamp_cal_matin : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(timestamp_cal_matin); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Serial.print("timestamp_cal_soir :"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Serial.print("timestamp_cal_soir :  "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(timestamp_cal_soir); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-					Serial.print("timestamp_2359 :"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+					Serial.print("timestamp_2359 :      "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(timestamp_2359); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					Serial.println(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -402,16 +406,20 @@ void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						if (DateSol_t[i][4]-SHIFT_DAY < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][3] - 1 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time( DateSol_t[i][3]-1, (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][3] ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( DateSol_t[i][4] - SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( DateSol_t[i][4] - SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time(DateSol_t[i][3], DateSol_t[i][4]-SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							//rtc.setAlarm1Time(t.hour, t.min+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(" with "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.println("minutes less."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.setControl(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.resetAlarm(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -429,23 +437,26 @@ void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					// Cas2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					else if ( (timestamp_time > timestamp_cal_matin) && (timestamp_time < timestamp_cal_soir) ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						Serial.println("=> Night is comming, CAS2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						Serial.print("=> Setting Alarm1 registers @ (45min SHIFT_NIGHT)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print("=> Setting Alarm1 registers @ "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						//car shift, on additionne le shift au timestamp_cal_soir 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						if (DateSol_t[i][6]+SHIFT_NIGHT >= 60) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][5] + 1 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( (DateSol_t[i][6]+SHIFT_NIGHT)-60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( (DateSol_t[i][6]+SHIFT_NIGHT)-60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time(DateSol_t[i][5]+1, (DateSol_t[i][6]+SHIFT_NIGHT)-60); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][5] ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( DateSol_t[i][6] + SHIFT_NIGHT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( DateSol_t[i][6] + SHIFT_NIGHT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time(DateSol_t[i][5], DateSol_t[i][6]+SHIFT_NIGHT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							//rtc.setAlarm1Time(t.hour, t.min+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(" with "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(SHIFT_NIGHT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.println("minutes more."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.setControl(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.resetAlarm(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -466,24 +477,26 @@ void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						//car shift, on soustrait le shift au timestamp_cal_matin 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						if (DateSol_t[i][4]-SHIFT_DAY < 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][3] - 1 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time( DateSol_t[i][3]-1, (DateSol_t[i][4]-SHIFT_DAY)+60 ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							Serial.print( DateSol_t[i][3] ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.print(" : "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-							Serial.println( DateSol_t[i][4] - SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+							Serial.print( DateSol_t[i][4] - SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							rtc.setAlarm1Time(DateSol_t[i][3], DateSol_t[i][4]-SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							//rtc.setAlarm1Time(t.hour, t.min+1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(" with "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.print(SHIFT_DAY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						Serial.println("minutes less."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.setControl(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						rtc.resetAlarm(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						Serial.println(read); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						if(read == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+						if(read == HIGH) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							ouvrirPorte(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 							delay(100); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -494,7 +507,6 @@ void loop() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 					else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						Serial.print("=> Waiting "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-						asm volatile ("  jmp 0"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						Serial.print(61 - t.sec); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						Serial.println(" seconds for minute change, and reset."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 						delay((61 - t.sec) * 1000); 
			 |