702 B
702 B
setMonitor
Description
Associates the MonitorFrame with an in-game monitor. The content of the MonitorFrame will be displayed on the specified monitor.
Parameters
string|tablethe monitor object or name
Returns
objectThe object in use
Usage
- Creates a MonitorFrame and associates it with a monitor:
local basalt = require("basalt")
local monitor = peripheral.wrap("top") -- Assuming a monitor is on the top side
local monitorFrame = basalt.addMonitor()
monitorFrame:setMonitor(monitor)
basalt.autoUpdate()
or
local basalt = require("basalt")
local monitorFrame = basalt.addMonitor()
monitorFrame:setMonitor("top")
basalt.autoUpdate()