Updated monitor driver
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
local monitor = peripheral.find("monitor")
|
local kernel = require("kernel")
|
||||||
monitor.setCursorPos(1, 1)
|
local monitor = kernel.addDriver("monitor-driver")
|
||||||
|
|
||||||
local function run()
|
local function run()
|
||||||
monitor.write("Starting system...\n")
|
monitor.writeLine("Starting system...")
|
||||||
|
monitor.writeLine("System started successfully!")
|
||||||
end
|
end
|
||||||
|
|
||||||
return { run = run }
|
return { run = run }
|
||||||
9
monitor-driver.lua
Normal file
9
monitor-driver.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
local monitor = peripheral.find("monitor")
|
||||||
|
|
||||||
|
local function writeLine(text)
|
||||||
|
monitor.write(text)
|
||||||
|
local x, y = monitor.getCursorPos()
|
||||||
|
monitor.setCursorPos(1, y + 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
return { writeLine = writeLine }
|
||||||
Reference in New Issue
Block a user