Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sec = 0
- local modem = peripheral.wrap("left")
- modem.open(1)
- local _, side, freq, rfreq, message = os.pullEvent('modem_message')
- print(message)
- print("Preparing!")
- while true do
- local _, side, freq, rfreq, message = os.pullEvent('modem_message')
- if message == "SecOFF" then
- print(message)
- rs.setOutput("top", false)
- sec = 0
- end
- if message == "SecON" then
- print(message)
- rs.setOutput("top", true)
- sec = 1
- end
- if message == "SecState" then
- print(message)
- modem.transmit(1, 1, sec)
- end
- end
Add Comment
Please, Sign In to add comment