ecco7777

CC day/night sensor

Mar 14th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. m=peripheral.wrap("front")
  2. while true do
  3. m.clear()
  4. m.setTextScale(5)
  5. m.setCursorPos(1,1)
  6. if os.time()<=18.5 then
  7. m.write("Day")
  8. rs.setOutput("top",false)
  9. else
  10. m.write("Night")
  11. rs.setOutput("top",true)
  12. end
  13. sleep(1)
  14.  
  15. end
Add Comment
Please, Sign In to add comment