Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fer = peripheral.wrap("back")
- local size = fer.getInventorySize()
- function redControl()
- local count = 0
- for i=1, 6 do
- --local inv = fer.getStackInSlot(i)["name"]
- if fer.getStackInSlot(i) == nil then
- count = 0
- else
- count = count + 1
- print (count)
- end
- end
- if count == 6 then
- rs.setOutput("bottom", true)
- print ("red in")
- else
- rs.setOutput("bottom", false)
- print ("no red")
- end
- end
- while true do
- redControl()
- os.sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement