Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wmodem = peripheral.wrap("top")
- local modem = peripheral.wrap("right")
- wmodem.open(55002)
- sleep(1)
- modem.transmit(56002, 3, "ON")
- redstone.setOutput("left",false)
- while true do
- event, s, f, rf, msg = os.pullEvent("modem_message")
- if msg == "OFF" then
- redstone.setOutput("left",true)
- print(""..msg)
- modem.transmit(56002, 3, "OFF")
- end
- if msg == "ON" then
- redstone.setOutput("left",false)
- print(""..msg)
- modem.transmit(56002, 3, "ON")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement