include 16c84_10 include jlib pin_a0_direction = output pin_a1_direction = input var byte tijdsduur = 10 procedure knipperen is for tijdsduur loop pin_a0 = high delay_100ms( 5 ) pin_a0 = low delay_100ms( 5 ) pin_a0 = high end loop end procedure procedure instellen is tijdsduur = 0 var byte pauze = 0 while pauze < 20 loop if pin_a1 != low then delay_100ms( 1 ) pauze = pauze + 1 else pauze = 0 delay_100ms( 2 ) tijdsduur = tijdsduur + 1 while pin_a1 == low loop end loop end if end loop end procedure procedure ingedrukt is pin_a0 = low var byte tijd = 0 while pin_a1 == low loop delay_100ms( 1 ) tijd = tijd + 1 if tijd == 50 then pin_a0 = high instellen knipperen end if end loop pin_a0 = low delay_1s( tijdsduur ) end procedure forever loop pin_a0 = high if pin_a1 == low then ingedrukt end if end loop