include 16c84_10 include jlib pin_a0_direction = output pin_a1_direction = input port_b_direction = all_output procedure lees_code( byte out x ) is for 8 loop var byte n = 0 while pin_a1 == high loop delay_1mS( 5 ) n = n + 1 if n == 255 then x = 0 return end if end loop delay_1ms( 200 ) x = x << 1 if pin_a1 == low then x = x + 1 end if while pin_a1 == low loop end loop end loop end procedure var byte code forever loop pin_a0 = high if pin_a1 == low then lees_code( code ) if code == 0b_0000_1111 then pin_a0 = low delay_1s( 5 ) else delay_1s( 10 ) end if end if end loop