Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- primaryID = 48
- reactor = peripheral.wrap("bottom")
- while true do
- senderID, message, protocol = rednet.receive()
- if senderID == primaryID and message == "startup" then
- if reactor.getActive() == false then
- reactor.setActive(true)
- rednet.send(primaryID, "OK")
- print("Current State: 1")
- else rednet.send(primaryID, "No go")
- end
- elseif senderID == primaryID and message == "shutdown" then
- if reactor.getActive() == true then
- reactor.setActive(false)
- rednet.send(primaryID, "OK")
- print("Current State: 0")
- else rednet.send(primaryID, "No go")
- end
- end
- end
Add Comment
Please, Sign In to add comment