Darknio

Uhr mit Hinweislampe

Jun 17th, 2022 (edited)
1,075
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. mon = peripheral.wrap("top")
  2. mon.setTextScale(2)
  3.  
  4. function Lampe()
  5. lamp = os.time()
  6. if lamp < 6.000 then
  7.     rs.setOutput("top",true)
  8. elseif lamp > 18.500 then
  9.     rs.setOutput("top",true)
  10. else
  11.     rs.setOutput("top",false)
  12. end
  13. end
  14.  
  15.  
  16. while true do    
  17. Lampe()
  18. mon.clear()
  19. mon.setCursorPos(1,1)
  20. mon.write(textutils.formatTime(os.time(),true))
  21. mon.setCursorPos(1,2)
  22. mon.write("Tag ")
  23. mon.write(textutils.serialize(os.day()),number)
  24.  
  25. sleep(0.5)
  26. rs.setOutput("top",false)
  27. sleep(0.5)
  28. end
  29.  
Comments
  • User was banned
Add Comment
Please, Sign In to add comment