Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- sets some variables
- local gatereader = peripheral.wrap("top")
- local data = gatereader.get()
- local cX,cY = term.getCursorPos()
- -- creates a function we can use to go down on the next line in the terminal
- function newLine()
- local _,cY= term.getCursorPos()
- term.setCursorPos(1,cY+1)
- end
- -- clears and resets the cursor position before writing the table
- term.clear()
- term.setCursorPos(1,1)
- -- prints out what the gate reader can sense from the block(s) attached to it.
- for i, j in pairs(data) do
- term.write(tostring(i)..": "..tostring (j))
- newLine()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement