kernel = require("kernel")
speakerDriver = kernel.addDriver("speaker_driver")
local modem = peripheral.find("modem")
local monitor = peripheral.wrap("top")
controlRoomSpeakers = peripheral.find("speaker")

function setNewLine()
        local x,y = monitor.getCursorPos()
        monitor.setCursorPos(1, y + 1)
        monitor.clearLine()
end

local function startup()
  speakerDriver.startup()
  speakerDriver.playTTSFile(peripheral.wrap("left"), "ELLO MATE LOVELY DAY INIT YOU GOT ANYYYY BEEEANSS AND TOAST ON YA MATE ID LOVE TO HAVE SOME BEANS N TOAST")
  speakerDriver.playTTSFile(peripheral.wrap("right"), "ELLO MATE LOVELY DAY INIT YOU GOT ANYYYY BEEEANSS AND TOAST ON YA MATE ID LOVE TO HAVE SOME BEANS N TOAST")
end

local function run()
    monitor.setTextScale(0.5)
    monitor.setCursorPos(1,0)
    startup()
    while true do
        setNewLine()
        monitor.write("Checking for reactor status...")
        setNewLine()
        monitor.write("Checking main control loop...")
        sleep(2)
    end
end

return { run = run }