Advertisement
Guest User

cap

a guest
Jan 31st, 2015
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. cap = peripheral.wrap("back")
  2.  
  3. function control()
  4.  energy = cap.getEnergyStored()
  5.  energyComp = energy * 64
  6.  print("Energy Level:")
  7.  print(energyComp)
  8.  
  9.  if energyComp > 1500000000 then
  10.   redstone.setOutput("right", false)
  11.   redstone.setOutput("left", false)
  12.  else if energy > 10000000 then
  13.   redstone.setOutput("right", true)
  14.   redstone.setOutput("left", true)
  15.  end
  16. end
  17. end
  18.  
  19. while true do
  20.  control()
  21.  sleep(60)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement