Advertisement
Guest User

startup

a guest
Feb 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. mon = peripheral.wrap("top")
  2. p = peripheral.wrap("right")
  3. while true do
  4. rs.setAnalogOutput("front",5)
  5. pressure = p.getPressure()
  6. mon.setTextScale(1.5)
  7. mon.clear()
  8. mon.setCursorPos(1,2)
  9. mon.write(string.sub(pressure,1,4))
  10. mon.setCursorPos(1,3)
  11. mon.write("Bars")
  12. if(pressure < 19.5) then
  13. rs.setOutput("right",false)
  14. else
  15. rs.setOutput("right",true)
  16. end
  17. sleep(0.5)
  18.  
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement