Advertisement
fantadada

periph 1

Jul 5th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1.  
  2. rednet.open("back")
  3. print("Peripherique serveur numero : 1 ")
  4. print("Fonction ouverture de la porte centrale ")
  5. while true do
  6.     sleep(0.2)
  7.     id, msg = rednet.receive
  8.         if id == 20 then
  9.             print("Indentification ok")
  10.                 if msg == "door1" then
  11.                 rednet.broadcast("op1")
  12.                 print("Ouverture de la porte") 
  13.                 sleep(2)
  14.                 end
  15.         end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement