Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --tapew, use this to write to the tape
- local component = require("component")
- local tape = component.tape_drive
- local file = io.open("/mnt/230/audio", "rb") --change '230' to your drives 3 letters, change 'audio' to the name of the file
- local block = 1024
- while true do
- local bytes = file:read(block)
- if not bytes then break end
- tape.write(bytes)
- end
- --taper, plays the tape, pointless now because yo can do it on the tape drive, but here anyway.
- local component = require("component")
- local tape = component.tape_drive
- while true do
- if tape.seek(-1000000) < 1 then
- break
- end
- end
- tape.play()
- --tapel, labels the tape(doesn't take spaces yet, sorry)
- local component = require("component")
- local tape = component.tape_drive
- local args = {...}
- if #args < 1 then
- print("Usage: tapel {label}")
- else
- tape.setLabel(args[1])
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement