Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("left")
- modem.open(1)
- if rs.getOutput("left") == true then
- modem.transmit(1, 1, "ON")
- end
- if rs.getOutput("left") == false then
- modem.transmit(1, 1, "OFF")
- end
- event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if message == "toggle" then
- if rs.getOutput("left") == false then
- rs.setOutput("left", true)
- else
- rs.setOUtput("left", false)
- end
- sleep(0.1)
- shell.run("startup")
Advertisement
Add Comment
Please, Sign In to add comment