Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = { ... }
- if #tArgs < 2 then
- print("Usage: listener <frequency> <side>")
- return
- end
- local freq = tArgs[1]
- local side = tArgs[2]
- rednet.open("bottom")
- while true do
- local id, msg, state = rednet.receive()
- if msg == freq then
- rs.setOutput(side, state == "true")
- -- print(side.." set to "..state)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement