Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wireless = "right"
- wired = "top"
- modem1 = peripheral.wrap(wireless)
- modem2 = peripheral.wrap(wired)
- modem1.open(50)
- modem1.open(100)
- modem1.open(150)
- modem1.open(200)
- modem1.open(300)
- modem2.open(50)
- modem2.open(100)
- modem2.open(150)
- modem2.open(200)
- modem2.open(300)
- while true do
- local event,side,freq,rplfreq,msg,dist = os.pullEvent("modem_message")
- print(msg)
- if side == wireless then
- modem2.transmit(freq,rplfreq,msg)
- elseif side == wired then
- modem1.transmit(freq,rplfreq,msg)
- else
- print("Lost Message - check side config")
- end
- end
Add Comment
Please, Sign In to add comment