Advertisement
Vodka51200

turbine

Nov 26th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1.     local iddesti = 46
  2.     local turbine = peripheral.wrap("back")
  3.     local data = {}
  4.      
  5.     rednet.open("top")
  6.      
  7.     while true do
  8.             local p = 0
  9.             if turbine.getActive() then p = 1 end
  10.             data["active"] = p
  11.             data["rotor"] = turbine.getRotorSpeed()
  12.             data["energy"] = turbine.getEnergyProducedLastTick()
  13.      
  14.             rednet.send(iddesti,textutils.serialize(data))
  15.            
  16.             os.sleep(1)
  17.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement