Advertisement
MCFunRide

House Automation - Lights

Apr 12th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. rednet.open("right")
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. print("House Automation - Lights")
  5. print("Waiting for command from control")
  6.  
  7. while true do
  8. local scrap, message = rednet.receive()
  9.  
  10. if message == "lightsOn" then
  11. rs.setOutput("front",true)
  12. elseif message == "lightsOff" then
  13. rs.setOutput("front",false)
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement