Posted 04 July 2014 - 06:14 AM
Hey guys, i could use some help with this program below, it detects the current daytime (i got a separated one for time)
i need to add lines to make it detect also the current Weather (Rain, Thunder, Clear) and Biome (ocean, etc), but i dont know the parameters.
http://pastebin.com/GD5SsS7i
i can use OpenCCSensors (with World Sensor) if needed, but also dont know the parameters
thank you guys
i need to add lines to make it detect also the current Weather (Rain, Thunder, Clear) and Biome (ocean, etc), but i dont know the parameters.
m = peripheral.wrap("left")
m.setBackgroundColor(colors.black)
m.clear()
m.setTextScale(0.5)
while true do
--shell.run("clear")
local time = os.time()
--local formattedTime = textutils.formatTime(time,true)
m.clear()
m.setCursorPos(5,1)
m.setTextColor(colors.blue)
m.write("GEODATA")
if time > 5 and time < 6 then
t = "SUNRISE"
elseif time > 6 and time < 12 then
t = "MORNING"
elseif time > 12 and time < 18 then
t = "AFTERNOON"
elseif time > 18 and time < 19.5 then
t = "SUNSET"
elseif time > 19.5 and time < 21 then
t = "EVENING"
else
t = "NIGHT"
end
m.setTextColor(colors.lime)
m.setCursorPos(1,3)
m.write("TIME: "..t)
sleep(.5)
end
http://pastebin.com/GD5SsS7i
i can use OpenCCSensors (with World Sensor) if needed, but also dont know the parameters
thank you guys