Kód: Vybrat vše
seconds = b0/10*16
seconds = b0//10+seconds
Kód: Vybrat vše
seconds = b0/10*16
seconds = b0//10+seconds
Kód: Vybrat vše
let b1=b0
let hour = b0/10*16
let hour = b1//10+hour
Kód: Vybrat vše
stuj:
rozsvit cervenou, zhasni zelenou
dokud JE stisknuto cervene tlacitko, nedelej nic
pockej chvilku
vahani:
pokud JE stisknuto cervene tlacitko, jdi na stuj
pokud JE stisknuto zelene tlacitko, jdi na jed
jdi na vahani
jed:
zhasni cervenou, rozsvit zelenou
dokud JE stisknuto zelene tlacitko, nedelej nic
pockej chvilku
jdi na vahani
Kód: Vybrat vše
#picaxe 20M2
#no_data
low b.1
high b.0
do
if pinc.0=1 then
low b.1
high b.0
do loop while pinc.0=1 ; cekani na konec stisku tlacitka
endif
if pinc.1=1 then
low b.0
high b.1
do loop while pinc.1=1 ; cekani na konec stisku tlacitka
endif
loop while pinc.0<2 ; nekonecna smycka
Kód: Vybrat vše
[i]#picaxe 20M2
#no_data
high b.0 ;cervena
low b.1 ;zelena
low b.2 ;zluta
low b.3 ;bila
do
if pinc.0=1 then
low b.1
low b.2
low b.3
high b.0
do loop while pinc.0=1 ; cekani na konec stisku tlacitka
endif
if pinc.1=1 then
low b.0
low b.2
low b.3
high b.1
do loop while pinc.1=1 ; cekani na konec stisku tlacitka
endif
if pinc.2=1 then
low b.0
high b.1
low b.3
high b.2
do loop while pinc.2=1 ; cekani na konec stisku tlacitka
endif
if pinc.3=1 then
low b.0
low b.1
low b.2
high b.3
do loop while pinc.3=1 ; cekani na konec stisku tlacitka
endif
if pinc.4=1 then ; privolavaci navest a
high b.0
low b.1
low b.2
high b.3
pause 800
low b.3
pause 800
do loop while pinc.4=1 ; cekani na konec stisku tlacitka
endif
if pinc.5=1 then ; privolavaci navest b
low b.0
low b.1
low b.2
high b.3
pause 800
low b.3
pause 800
do loop while pinc.5=1 ; cekani na konec stisku tlacitka
endif
loop while pinc.0<2 ; nekonecna smycka[/i]