Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = {...}
- if arg[1] == nil then
- arg[1] = "potato"
- end
- function check()
- g, m, p = rednet.receive("pbp", 5)
- print(m)
- end
- rednet.open("left")
- if arg[1] == "potato" then
- rednet.send(2, "run", "pbp")
- check()
- elseif arg[1] == "on" then
- rednet.send(2, "run", "pbp")
- check()
- elseif arg[1] == "off" then
- rednet.send(2, "stop", "pbp")
- check()
- else
- print("Unknown argument")
- end
- rednet.close("left")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement