Monitor (ComputerCraft)

Revision as of 01:13, 25 December 2012 by Mastergalen (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
File:Monitor Computercraft.png
Monitor (ComputerCraft)

The ComputerCraft Monitor is a peripheral that allows a Console to display things without being close to it or opening the console GUI. When placed together, they will form a single, bigger, monitor. The largest monitor able to be created is 8 long by 6 high.

Recipe


Use

File:2012-06-26 22.04.16.png
A monitor next to its controlling console, displaying the message "Hello World!"

In the console, a program can be run by using the monitor command in the console with the following format:

monitor <side> <program>

but this means that if you have a program that starts automatically, such as something to display IC2 Nuclear Reactor information, it won't start up displaying information on the monitor, it will just display it on the console.

File:2012-09-16 19.23.15.png
A clock using simple repeative code and a monitor.

If you type "monitor <side> shell", other things you type will show up on the monitor on <side> instead of the GUI. Doing this saves you the trouble of using "monitor <side> <program>", but if you want to stop doing so, you need to break and replace (or reboot) the computer.

You can instead use the code:

term.redirect(monitor)

but this will put everything on the monitor that would normally be on the console. Even if you open the GUI and enter another command, it will display on the monitor instead, which is inconvient as you have to close the GUI and look at the monitor to see if you typed something right. Instead, in your code, you can say:

mon = peripheral.wrap("side")

where side is the side the monitor is on. Now if you want to, say print something on the monitor, you can type:

mon.write("Hello world!")

And it will have the desired effect.


To clear the entire using code, type in

mon.clear()

And to reset the position of the cursor,

mon.setCursorPos(x,y)


Keep in mind that these commands do not come with the computer. These are all Lua type commands, which means that you have to make a program to utilize them.

For something simple, type this in the console: monitor <Side> secret/alongtimeago

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis