Redxone

[CC - 16bit Computer] Bus Display

Feb 13th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local mon = peripheral.find("monitor")
  2. term.redirect(mon)
  3. mon.setTextScale(3)
  4. local w, h = term.getSize()
  5. local rw, rh = w/2, h/2
  6. local old = rs.getBundledInput("left")
  7. term.clear()
  8. term.setCursorPos((rw - #tostring(old)/2)+1,rh)
  9. write(old)
  10. while true do
  11.   local data = rs.getBundledInput("left")
  12.   if(data ~= old)then
  13.     term.clear()
  14.     term.setCursorPos((rw - #tostring(data)/2)+1,rh)
  15.     write(data)
  16.     old = data
  17.   end
  18.   sleep(0)
  19. end
Add Comment
Please, Sign In to add comment