Jump to content

Recommended Posts

Posted

mon = peripheral.wrap("right") --assumes monitor is on right side of computer

mon.clear() --clear the monitor

mon.setCursorPos(1,1) --set cursor to upper left position

mon.write("Hello world!") --write text

Posted

Check out this link for a list of commands

http://computercraft.info/wiki/index.php?title=Peripheral_(API)#Monitor

To write a new line you can use

mon.setCursorPos(line number,1) -- replace line number with a variable or literal number

mon.write("Some text")

I thought you could use print() with monitors but perhaps not, none of my programs seem to use it. Print() automatically moves to a new line after each statement.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...