Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- mon=peripheral.wrap("top")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("OFF")
- print("Moteurs des Squeezers")
- print("Entrez le nombre de minutes")
- print("Choix possibles 1,2,3,4,5")
- text = read()
- if text == ("1") then
- write("Allumage pour 1 minute")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("ON")
- redstone.setOutput("back" , true)
- sleep(60)
- redstone.setOutput("back" , false)
- end
- if text == ("2") then
- write("Allumage pour 2 minute")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("ON")
- redstone.setOutput("back" , true)
- sleep(120)
- redstone.setOutput("back" , false)
- end
- if text == ("3") then
- write("Allumage pour 3 minute")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("ON")
- redstone.setOutput("back" , true)
- sleep(180)
- redstone.setOutput("back" , false)
- end
- if text == ("4") then
- write("Allumage pour 4 minute")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("ON")
- redstone.setOutput("back" , true)
- sleep(240)
- redstone.setOutput("back" , false)
- end
- if text == ("5") then
- write("Allumage pour 5 minute")
- mon.clear()
- mon.setCursorPos(3,3)
- mon.write("ON")
- redstone.setOutput("bottom" , true)
- sleep(300)
- redstone.setOutput("bottom" , false)
- end
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement