Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- while true do
- to, msg, prtc = rednet.receive()
- local status = rs.getInput("left")
- if status == false then
- sender = "OFF"
- else
- sender = "ON"
- end
- if msg == "STATUS" then
- rednet.send(to, sender)
- print("STATUS")
- elseif msg == "OFF" then
- rs.setOutput("left", false)
- print("OFF")
- elseif msg == "ON" then
- rs.setOutput("left", true)
- print("ON")
- elseif msg == "INFO" then
- var = "Installato il: 29/05/2021\nDa: FoxInvest Holding\nStato: OPERATIVO\nCodice seriale: 202105AC1"
- rednet.send(to, var)
- print("INFO")
- end
- end
Add Comment
Please, Sign In to add comment