Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function doRsPulse()
- rs.setOutput("back", true)
- sleep(0.1)
- rs.setOutput("back", false)
- end
- local itemDetRsCount = 0
- local itemDetRsCountThresh = 3
- function checkAndPulse()
- if rs.getInput("bottom") then
- itemDetRsCount = itemDetRsCount + 1
- else
- itemDetRsCount = 0
- end
- if itemDetRsCount >= itemDetRsCountThresh then
- doRsPulse()
- itemDetRsCount = 0
- end
- sleep(0.2)
- end
- while true do checkAndPulse() end
Advertisement
Add Comment
Please, Sign In to add comment