Advertisement
Guest User

Home

a guest
Apr 26th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. R=peripheral.wrap("right");
  2. pcp=peripheral.wrap("top");
  3. pcp.open(3460);
  4. Var="0"
  5. while true do
  6. E=R.getEnergyStored();
  7. print(E)
  8. if E>9500000 then
  9. R.setActive(false);
  10. end
  11. if R.getActive() then
  12. Var="true"
  13. else
  14. Var="false"
  15. end
  16.  
  17. pcp.transmit(3460, 1,"R1:"..Var)
  18.  
  19.  
  20.  
  21. if E<500000 then
  22. R.setActive(true)
  23. end
  24. sleep(1)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement