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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...