Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rfid = peripheral.wrap("back")
- rednet.open("top")
- while true do
- if not rfid.isScanning() then
- rfid.scan(5)
- end
- local event,pass, = os.pullEvent()
- if event == "rfid_detected" and pass == "test" then
- rednet.send(25,"dorothy")
- sleep(10)
- redstone.setOutput("right",true)
- sleep(3)
- redstone.setOutput("right",false)
- end
- senderId,msg,protocol = rednet.receive(10)
- if msg == "dorothy" then
- redstone.setOutput("right",true)
- sleep(3)
- redstone.setOutput("right",false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement