Advertisement
ame824

time

Apr 13th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local m = peripheral.wrap("top")
  2. local lo = 0
  3.  
  4. function main()
  5.     while( lo < 16 )
  6.     do
  7.         local t = textutils.formatTime(os.time(), true)
  8.         local nT = textutils.formatTime(18, true)
  9.         if t == nT then
  10.             m.write("zeit zu wechseln")
  11.             rs.setOutput("left", true)
  12.             sleep(0.1)
  13.             rs.setOutput("left", false)
  14.             os.reboot()
  15.         end
  16.         m.write("Es ist "..t.." Uhr")
  17.         sleep(0.8)
  18.         m.clear()
  19.         m.setCursorPos(1,2)
  20.         lo = lo + 1
  21.         if lo == 15 then
  22.             os.reboot()
  23.         end
  24.     end
  25. end
  26.  
  27. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement