LuaScripts/linkedSend.lua

15 lines
332 B
Lua
Raw Normal View History

2021-01-07 23:32:44 +00:00
local component = require("component")
local event = require("event")
local t = component.tunnel
print("exit - выйти")
while true do
io.write("msg: ")
_, message = pcall(io.read)
if message == "exit" then
break
end
t.send(message)
local _, _, _, _, _, message = event.pull("modem_message")
print(message)
end