Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- quick program to control a crystal tank
- max = 946000 * 1000
- rsdir = "left"
- ontime = 180
- offtime = 60
- t = peripheral.find("cccrystaltankauxtile")
- while (true) do
- level = t.getTankInfo()[1].contents.amount
- if level/max < 0.9 then
- redstone.setOutput(rsdir,true)
- sleep(ontime)
- redstone.setOutput(rsdir,false)
- end
- sleep(offtime) -- leave some off time for other processing
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement