Advertisement
SkyFlash21

Untitled

Jul 20th, 2021
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. local modem = peripheral.wrap("left")
  2. print("Bienvenu dans le proggrame de gestion des robot MK1")
  3. sleep(1)
  4. print("Initialisation en cours :")
  5. sleep(1)
  6. print()
  7. print("Quelle port utiliser ?")
  8. port = read()
  9. modem.open(3)
  10.  
  11. print("Initialisation terminer")
  12. sleep(2)
  13. clear
  14. print("Recheche du serveur ")
  15.  
  16. local event, modemSide, senderChannel,
  17. replyChannel, message, senderDistance = os.pullEvent("modem_message")
  18.  
  19. print("I just received a message on channel: "..senderChannel)
  20. print("I should apparently reply on channel: "..replyChannel)
  21. print("The modem receiving this is located on my "..modemSide.." side")
  22. print("The message was: "..message)
  23. print("The sender is: "..(senderDistance or "an unknown number of").." blocks away from me.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement