Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Constants:
- local redNetSide = "left"
- local redInSide = "top"
- local compID1 = 4
- --Variables:
- --Functions:
- function netClose()
- rednet.close(redNetSide)
- end
- function netOpen()
- netClose()
- rednet.open(redNetSide)
- end
- function sendAllOn()
- rednet.send(compID1, "On")
- end
- function sendAllOff()
- rednet.send(compID1, "Off")
- end
- --MAIN PROGRAM:
- netOpen()
- while true do
- if redstone.getInput(redInSide) then
- sendAllOn()
- print("Turning On")
- else
- sendAllOff()
- print("Turning Off")
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment