Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("top")
- modem.open(1)
- while true do
- e, _, _, _, m = os.pullEvent("modem_message")
- print(m)
- if m == "turn_on" then
- rs.setOutput("right", true)
- modem.transmit(2,1, "on")
- elseif m == "turn_off" then
- rs.setOutput("right", false)
- modem.transmit(2,1, "off")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement