Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement