Advertisement
LokeYourLord

Mag Card Access

Jun 8th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while true do
  2. reader = peripheral.wrap("back")
  3. reader.setInsertCardLight = true
  4. redstone.setOutput("right", true)
  5. redstone.setOutput("left", false)
  6. p1,p2,p3 = os.pullEvent("mag_swipe")
  7. print("Card data: "..p2)
  8. if p2 == "ACCESSCARD" then
  9. redstone.setOutput("right", false)
  10. redstone.setOutput("left", true)
  11. redstone.setOutput("bottom", true)
  12. sleep(4)
  13. redstone.setOutput("bottom",false)
  14. end
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement