Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("back")
- modem.open(1)--Open channel 3 so that we can listen on it
- while true do
- if rs.getInput("bottom") then
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- if event == "modem_message" then
- if message == "Strom_aus" then
- rs.setOutput("top",true)
- modem.close(1)
- modem.transmit(1,1, "Strom")
- modem.open(1)
- sleep(0.1)
- else
- rs.setOutput("top",false)
- sleep(0.1)
- end
- end
- sleep(0.1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement