This commit is contained in:
2025-06-15 16:23:13 -04:00
parent dcb75ee52c
commit ead0e6379e
9 changed files with 118 additions and 108 deletions

26
environment_driver.lua Normal file
View File

@@ -0,0 +1,26 @@
local function getValue()
return environment.getRadiationLevel().radiation
end
local function watch()
while true do
sleep(0.05) -- Update every tenth second
end
end
local function startUp()
end
local function shutdown()
end
local function report()
local value = getValue()
local color = colors.black
monitor.setBackgroundColor(color)
setNewLine()
monitor.write("Radiation Level: " .. tostring(value))
end
return { report = report, watch = watch, startUp = startUp, shutdown = shutdown }