SD_Ecliptica

Kensington Relay

Dec 9th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. --[[Kensington Network
  2.     If range becomes an issue, add relays to increase it.
  3. --]]
  4.  
  5. local PORT1 = 47838
  6. local PORT2 = 47839
  7. local PORT3 = 47840
  8. local PORT4 = 47841
  9. local PORT5 = 47842
  10. local PORT6 = 47843
  11.  
  12. local modem = peripheral.wrap("left")
  13. modem.open(PORT1)
  14. modem.open(PORT2)
  15. modem.open(PORT3)
  16. modem.open(PORT4)
  17. modem.open(PORT5)
  18. modem.open(PORT6)
  19.  
  20. while true do
  21.         local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  22.         modem.transmit(senderChannel, replyChannel, message)
  23.         print("Transmitting on " .. senderChannel .. ": " .. message)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment