Darknio icon

Timer mit Uhr

Darknio | PRO | 03/14/15 03:39:17 AM UTC | 0 ⭐ | 611 👁️ | Never ⏰ | []
Lua |

620 B

|

None

|

0 👍

/

0 👎

local schalterSide = "right" 
local clockAusgang = "bottom"
local LampenSide = "top"
 
 
 
 
local timer = "an"
function Clock()
if rs.getInput("schalterSide") == true then
timer = "an"
rs.setOutput("clockAusgang",true)
sleep(0.5)
rs.setOutput("clockAusgang",false)
else
timer = "aus"
end
 
sleep(1)
end
 
 
 
 
function Time()
if timer == "an" then
rs.setOutput("LampenSide",true)
else
rs.setOutput("LampenSide",false) 
end
shell.run("clear")
print(textutils.formatTime(os.time(), true))
print("Timer ",timer)
sleep(1)
end
 
 
                   
    while true do
    parallel.waitForAny(Time,Clock)
    end

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎