Advertisement
Cardwell

WireLESS

Apr 3rd, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. --Variabler
  2. local door = "front"
  3. local listeningfrom = "7"
  4.  
  5. rednet.open("left")
  6. while true do
  7. id, msg = rednet.receive()
  8. print("")
  9. print("#"..id)
  10. print(msg)
  11.  
  12. if id == listeningfrom and msg == "dooropen" then
  13. print("Åpner dør!")
  14. rs.setOutput(door,true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement