Advertisement
Guest User

test

a guest
Feb 28th, 2014
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. os.loadAPI("ocs/apis/graph")
  2. os.loadAPI("ocs/apis/sensor")
  3.  
  4. local mon=peripheral.wrap("right")
  5. local aesensor1= "left"
  6. local aesystem1="0,0,3"
  7. local getdetails = "getTargetDetails"
  8.  
  9. function update()
  10.   local tab = sensor.call(aesensor1, getdetails, aesystem1)
  11.   return tab.SystemPower
  12. end
  13.  
  14. graphInstance = graph.new(mon, update, "System Power", nil, 1, 1000, false)
  15.  
  16. while true do
  17.   graphInstance:draw()
  18.   sleep(0.5)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement