Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- side = "right" -- modem side
- filename = "file" -- File name
- timeout = 20 -- timeout in seconds, set to nil for no timeout
- rednet.open(side)
- print("Receiving...")
- a,b = rednet.receive(timeout)
- if b then
- f = fs.open(filename,"w")
- f.write(:(/>/>
- f.close()
- print("Received.")
- else
- print("Timed out.")
- end
- term.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement