Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tank=peripheral.wrap("back")
- while tank.getFilledPercentage() < .9 do
- local B = peripheral.wrap("monitor_0")
- B.setTextScale(1)
- while true do
- local A = tank.getFilledPercentage()
- local C = math.floor(A * 100)
- B.clear()
- B.setCursorPos(1,3)
- B.write(C.."% Percent Full")
- if A < .8 then
- B.clear()
- B.setCursorPos(1,3)
- B.write(C.."% Percent Full")
- rs.setAnalogOutput("right", 15 )
- sleep(.5)
- else
- B.clear()
- B.setCursorPos(1,3)
- B.write(C.."% Percent Full")
- rs.setAnalogOutput("right", 0)
- sleep(.5)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment