Elgskred

CCInductionMatrixWireless

Feb 19th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. --Induction Matrix monitor
  2.  
  3. local modem = peripheral.wrap("left")
  4. local battery = peripheral.wrap("back")
  5.  
  6. while true do
  7.  
  8. local t = {}
  9. t[1] = 3 --Id
  10. t[2] = (battery.getStored() / battery.getMaxEnergyStored()) * 100
  11. t[3] = battery.getInput()
  12. t[4] = battery.getOutput()
  13. local msg = textutils.serialize(t)
  14. modem.transmit(1,10,msg) -- 1=sending chan , 10=reply chan , msg=message
  15. sleep(10)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment