Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. // Podlewanie automatyczne
  2. if ((w_g<dd) && (zezwolenie_czasowe==1) && (p_w == 0))  
  3. {
  4.   PORTD |= (1<<PD5) | (1<<PD7); // Załączanie pompy
  5.   _delay_ms(2000);
  6.  
  7.   if (wynik[2][0] == '2')
  8.   {
  9.     _delay_ms(2000);
  10.   }
  11.   if (wynik[2][0] == '3')
  12.   {
  13.     _delay_ms(4000);
  14.   }
  15.  
  16. PORTD &=~ (1<<PD5) | (1<<PD7); // Wyłączanie pompy
  17. wynik[4][0] = '0';   // Wykasowanie zezwolenia czasowego      
  18. RTC_SetDate(0,0,0);  // Wyzerowanie upływu czasu od ostatniego podlania
  19. RTC_SetTime(0,0,0);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement