Quant

R Sender 2C

Jul 3rd, 2015
247
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local symtime = 1
  2. local maxreqtime = 5
  3.  
  4.  
  5. local c = require("component")
  6. local s = require("sides")
  7. local r = c.redstone
  8. local l = tonumber(io.read())
  9.  
  10. os.sleep(maxreqtime - (os.time()%maxreqtime)+1)
  11. while l>0 do r.setOutput(s.right,(l%2)*15) l=(l-l%2)/2 os.sleep(symtime) end;
  12. os.sleep(symtime)
  13. r.setOutput(s.right,0)
  14. r.setOutput(s.back,15)
  15. os.sleep(2)
  16. r.setOutput(s.back,0)
  17. print("Finished")
RAW Paste Data