Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ZweiKnopfBedienung
- white=1
- orange=2
- magenta=4
- lightblue=8
- yellow=16
- lime=32
- pink=64
- grey=128
- lightGrey=256
- cyan=512
- purple=1024
- blue=2048
- brown=4096
- green=8192
- red=16384
- black=32768
- moni=peripheral.wrap("left")
- --moni.setTextScale(2)
- function moniBlink()
- for x=1,20 do
- moni.setBackgroundColor(colors.red) moni.clear()
- test()
- sleep(.1)
- moni.setBackgroundColor(colors.black) moni.clear()
- test()
- sleep(.1)
- end
- end
- function test()
- moni.setTextScale(2)
- moni.setCursorPos(1,1)
- moni.write("; ;")
- moni.setCursorPos(1,2)
- moni.write(" _ ")
- end
- function moniTime()
- moni.setTextScale(4)
- for x=20,1, -1 do
- if(x<10) then
- moni.setCursorPos(2,1)
- moni.write(math.floor(x))
- else
- moni.write(math.floor(x))
- end
- sleep(1)
- moni.clear() moni.setCursorPos(1,1)
- end
- end
- signalC=0
- counter=0
- while true do
- moni.setBackgroundColor(colors.black)
- moni.setTextScale(1)
- moni.setCursorPos(1,1)
- moni.write("Raum 1")
- signalB = redstone.getBundledInput("bottom")
- if (signalB > 0 ) then
- signalC = signalC + signalB
- counter = counter +1
- sleep(1)
- end
- if (signalC==magenta+grey) then
- redstone.setOutput("top",true)
- moniTime()
- signalC=0
- else
- redstone.setOutput("top",false) sleep(.2)
- if(counter>=2)then
- moniBlink()
- signalC=0
- counter=0
- end
- end
- print(redstone.getBundledInput("bottom"))
- sleep(.8)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement