updated
This commit is contained in:
@@ -22,13 +22,8 @@ local function checkTemperature()
|
||||
end
|
||||
end
|
||||
|
||||
-- local function color()
|
||||
-- local temperature = getValue()
|
||||
-- return colors.black
|
||||
-- end
|
||||
|
||||
local function watch()
|
||||
|
||||
while true do
|
||||
print("Temperature: " .. getValue())
|
||||
checkTemperature()
|
||||
@@ -37,18 +32,19 @@ local function watch()
|
||||
end
|
||||
|
||||
|
||||
local function startUp()
|
||||
end
|
||||
|
||||
local function shutdown()
|
||||
end
|
||||
|
||||
|
||||
-- local function watch()
|
||||
-- checkTemperature()
|
||||
-- end
|
||||
|
||||
local function report()
|
||||
local value = getValue()
|
||||
local color = colors.black
|
||||
monitor.setBackgroundColor(color)
|
||||
monitor.clearLine()
|
||||
|
||||
setNewLine()
|
||||
monitor.write("Temperature: " .. value .. "F")
|
||||
end
|
||||
return { report = report, watch = watch }
|
||||
return { report = report, watch = watch, startUp = startUp, shutdown = shutdown }
|
||||
Reference in New Issue
Block a user