Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ALARM
- rednet.open("left")
- local mottafra = 3
- local output = "bottom"
- while true do
- id, msg = rednet.receive()
- print("")
- print("Fra "..id)
- print(msg)
- if id == mottafra and msg == "ALARM_ON" then
- print("Alarm er på!")
- rs.setOutput(output, true)
- end
- if id == mottafra and msg == "ALARM_OFF" then
- print("Alarm er av!")
- rs.setOutput(output, false)
- end
- end
Add Comment
Please, Sign In to add comment