gunny576

Test_display

Apr 7th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local r2 = peripheral.wrap("BigReactors-Turbine_2")  
  2. m = peripheral.wrap("monitor_0")
  3. m.clear()
  4. m.setBackgroundColor(colors.black)
  5. m.setCursorPos(1,1)
  6. m.write("Turbine 1: " .. math.floor(r2.getRotorSpeed() + .5) .. " RPM")
  7.  
  8.      bar = math.floor(((r2.getRotorSpeed()/1800)*(5))+0.5)   
  9.     m.setCursorPos(2,2)
  10.      m.setBackgroundColour(colors.red)
  11.      m.write(string.rep(" ",2))
  12.      m.setCursorPos(2,2)
  13.      m.setBackgroundColour(colors.blue)
  14.      m.write(string.rep(" ",bar))
Add Comment
Please, Sign In to add comment