$crystal = 12000000 Config Lcd = 16 * 2 Config Lcdbus = 4 Cursor Off Dim K As Byte , Kk As Word , Kkk As Word Dim T As Byte , Tt As Word , Ttt As Word Dim V As Byte P3 = 255 Cls Lcd "Reguliranje" Lowerline : Lcd " navodnjavanja" Wait 5 Cls Do K = 0 Kk = 0 T = 0 Tt = 0 V = 0 Lcd "Paljenje za: " Lowerline : Lcd "0 minuta " Do If P3.4 = 0 Then P3.4 = 1 Waitms 250 : Waitms 250 K = K + 1 Kk = K * 5 Locate 2 , 1 Lcd Kk ; " minuta " End If If P3.5 = 0 Then P3.5 = 1 Waitms 250 : Waitms 250 Exit Do End If Loop Cls Lcd "Trajanje je:" Lowerline : Lcd "0 minuta " Do If P3.4 = 0 Then P3.4 = 1 Waitms 250 : Waitms 250 T = T + 1 Tt = T * 5 Locate 2 , 1 Lcd Tt ; " minuta " End If If P3.5 = 0 Then P3.5 = 1 Waitms 250 : Waitms 250 Exit Do End If Loop Cls Lcd "Broj izlaza je:" Lowerline : Lcd "0" Do If P3.4 = 0 Then P3.4 = 1 Waitms 250 : Waitms 250 V = V + 1 If V = 4 Then V = 1 Lowerline Lcd V End If If P3.5 = 0 Then P3.5 = 1 Waitms 250 : Waitms 250 Exit Do End If Loop Cls Lcd "Cekam..." For Kkk = 1 To Kk Wait 60 Next If V = 1 Then P3.0 = 1 Elseif V = 2 Then P3.0 = 1 P3.1 = 1 Elseif V = 3 Then P3.0 = 1 P3.1 = 1 P3.2 = 1 End If Cls Lcd "Zalijevam..." For Ttt = 1 To Tt Wait 60 Next P3.0 = 0 P3.1 = 0 P3.2 = 0 Cls Loop End