Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("back")
- local tank = peripheral.wrap("front")
- modem.open(00004)
- rs.setOutput("top",true)
- modem.transmit(00004,00004,"off")
- term.clear()
- term.setCursorPos(1,1)
- print("Bees currently off.")
- while true do
- if tank.getFilledPercentage() < 0.5 then
- term.clear()
- term.setCursorPos(1,1)
- print("Bees currently on.")
- modem.transmit(00004,00004,"on")
- rs.setOutput("top",false)
- sleep(1)
- elseif tank.getFilledPercentage() > 0.9 then
- term.clear()
- term.setCursorPos(1,1)
- print("Bees currently off.")
- modem.transmit(00004,00004,"off")
- rs.setOutput("top",true)
- sleep(1)
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment