Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local turbiny={}
  2.  
  3. local mon = peripheral.wrap("right")
  4.  
  5. function printTurbineInfo(turbine,pos)
  6. local rpm = turbine.getRotorSpeed()
  7. mon.setCursorPos(1,pos)
  8. print("Turbina "..pos..": "..rpm.." RPM")
  9. end
  10.  
  11. for i,v in pairs(peripheral.getNames()) do
  12. turbiny[i] = peripheral.wrap(v)
  13. end
  14.  
  15. while true do
  16. sleep(1)
  17. mon.clear()
  18. for i,v in pairs(turbiny) do
  19. printTurbineInfo(v,i)
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement