View difference between Paste ID: 7mUi0sSf and 1CT6Gxyn
SHOW: | | - or go back to the newest paste.
1
rednet.open("top")
2
while true do
3
4
to, msg, prtc = rednet.receive()
5
6
local status = rs.getInput("left")
7
if status == false then
8
 sender = "OFF"
9
else
10
 sender = "ON"
11
end
12
13
 if msg == "STATUS" then
14
   rednet.send(to, sender)
15
   print("STATUS")
16
 elseif msg == "OFF" then
17
   rs.setOutput("left", false)
18
   print("OFF")
19
 elseif msg == "ON" then
20
   rs.setOutput("left", true)
21
   print("ON")
22
 elseif msg == "INFO" then
23
   var = "Installato il: 29/05/2021\nDa: FoxInvest Holding\nStato: OPERATIVO\nCodice seriale: 202105AC1"
24
   rednet.send(to, var)
25
   print("INFO")
26
 end
27
end