Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local WIFI = peripheral.find("modem")
- local port = 6352
- if (WIFI == nil) then
- print("Could not find wireless modem") return nil
- end
- WIFI.closeAll()
- WIFI.open(port)
- if not(WIFI.isOpen(port)) then
- print("could not open port:"..tostring(port).." on wireless modem") return nil
- end
- while true do
- WIFI.transmit(port,port,read())
- local _,_,_,_,msg = os.pullEvent("modem_message")
- print(textutils.serialise(msg))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement