Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- while true do
- local status = rs.getInput("left")
- if status == false then
- sender = "OFF"
- else
- sender = "ON"
- end
- to, msg, prtc = rednet.receive()
- if msg == "STATUS" then
- rednet.send(to, sender)
- print("STATUS")
- elseif msg == "OFF" then
- rs.setOutput("left", false)
- print("OFF")
- elseif msg == "ON" then
- rs.setOutput("left", true)
- print("ON")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement