Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function decode_num(n)
- local c = "\x7f"
- local r = ""
- while n>0 do
- if n%2==1 then r=r..c
- else r=r.." " end
- n=math.floor(n/2)
- end
- return r
- end
- local p = peripheral.find("printer")
- local n={}
- for m in string.gmatch(read(), "[^,]+") do
- n[#n+1]=decode_num(m+0)
- end
- p.newPage()
- for y=1,21 do
- p.setCursorPos(1,y)
- p.write(n[y])
- end
- p.endPage()
Advertisement
Add Comment
Please, Sign In to add comment