Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- local mon = peripheral.wrap("right")
- mon.clear()
- button.setTable("Sala 1", sala1, 5, 10, 4, 4)
- button.setTable("Sala 2", sala2, 5, 10, 7, 7)
- button.screen()
- button.heading("Aire")
- while true do
- ext, id,msg=os.pullEvent("rednet_message")
- if msg=="si" then
- if(id==24) then button.toggleButton("Sala 2") end
- if(id==26) then button.toggleButton("Sala 1") end
- print("Hay aire en sala "..id)
- else
- if(id==24) then button.toggleButton("Sala 2") end
- if(id==26) then button.toggleButton("Sala 1") end
- print("No hay aire en sala "..id)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement