Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- output = false
- limit = 8
- inSide = "left"
- outSide = "right"
- outputString = ""
- term.clear()
- while true do
- term.setCursorPos(1,1)
- os.startTimer(0.1)
- os.pullEvent("timer")
- if redstone.getAnalogInput(inSide) >= limit then
- output = false
- outputString = "off"
- else
- output = true
- outputString = "on"
- end
- reading = (redstone.getAnalogInput(inSide)/2) .. "/" .. (limit/2) .." bar" .. " -> " .. outputString
- term.clear()
- if redstone.getAnalogInput("front") >= 13 then
- redstone.setOutput(outSide, false)
- print("Override:\nCompressors off")
- else
- redstone.setOutput(outSide, output)
- print(reading)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement