Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- peripheral.find("modem", rednet.open)
- rednet.host("alarm_listener", "alarm_listener")
- while true do
- local id, msg = rednet.receive()
- if string.lower(msg) == "alarm" then
- print("ALARM")
- redstone.setOutput("back", true)
- elseif string.lower(msg) == "ok" then
- print("OK")
- redstone.setOutput("back", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment