Advertisement
m3Zz

Clock

Jun 1st, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. function clear()
  2.  term.clear()
  3.  term.setCursorPos(1,1)
  4.  monitor.clear()
  5.  monitor.setCursorPos(1,1)
  6. end
  7.  
  8. function setup()
  9.  dofile("format.lua")
  10.  monitor=peripheral.wrap("top")
  11.  clear()
  12.  monitor.setTextScale(2)
  13.  monitor.setTextColor(colors.lime)
  14. end
  15.  
  16. function main()
  17.  clear()
  18.  t=os.time()
  19.  t=textutils.formatTime(t,true)
  20.  d=formatDays(os.day(), "%02d.%02d.%02d")
  21.  print(t)
  22.  print(d)
  23.  monitor.write("   "..t.." Uhr")
  24.  monitor.setCursorPos(1,2)
  25.  monitor.write("   "..d)
  26.  sleep(0.5)
  27.  main()
  28. end
  29.  
  30. setup()
  31. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement