Advertisement
NekoTiki

qdfqdfdsfqdfqdf

Oct 19th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("back")
  2. m = peripheral.wrap("right")
  3.  
  4. local l,h = m.getSize()
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. shell.run("id")
  8.  
  9. function clrr()
  10.   if i >=0 then
  11.     m.setBackgroundColor(colors.blue)
  12.   elseif i >= 6 then
  13.     m.setBackgroundColor(colors.cyan)
  14.   elseif i >= 10 then
  15.     m.setBackgroundColor(colors.green)
  16.   elseif i >= 14 then
  17.     m.setBackgroundColor(colors.cyan)
  18.   elseif i >= 22 then
  19.     m.setBackgroundColor(colors.red)
  20.   elseif i >= 24 then
  21.     m.setBackgroundColor(colors.yellow)
  22.   end
  23. end
  24.  
  25. function prt()
  26.   term.clear()
  27.   term.setCursorPos(1,1)
  28.   print("H:"..h.." L:"..l)
  29. end
  30.  
  31. while true do
  32.  
  33.   -----  Recevoir les information   -----
  34.   local id1,e25,pe25 = rednet.receive("EnPt25")
  35.   local id2,r25,pr25 = rednet.receive("RoSp25")
  36.   print("e25:"..e25.." r25:"..r25)
  37.  
  38.   local id3,e34,pe34 = rednet.receive("EnPt34")
  39.   local id4,r34,pr34 = rednet.receive("RoSp34")
  40.   print("e34:"..e34.." r34:"..r34)
  41.  
  42.   local id5,e29,pe29 = rednet.receive("EnPt29")
  43.   local id6,r29,pr29 = rednet.receive("RoSp29")
  44.   print("e29:"..e29.." r29:"..r29)
  45.  
  46.   sleep(0.1)
  47.   ----- Fin d'attente d'information -----
  48.  
  49.  
  50.   ----- Reboot Screen -----
  51.   m.setBackgroundColor(colors.black)
  52.   m.clear()
  53.   ----- End Reboot Sc -----
  54.  
  55.   ----- Affichage (Bars) -----
  56.    -- 1er (Rotors CoP N27) --
  57.   m.setBackgroundColor(colors.black)
  58.   m.setCursorPos(2,2)
  59.   m.write("Rotors Speed:"..math.floor(r27*1))
  60.   m.setBackgroundColor(colors.blue)
  61.   m.setCursorPos(2,3)
  62.  
  63.   --local l1 = 0
  64.   l1 = r25 * (l-2) / 2000
  65.   print(l1)
  66.  
  67.   for i=1,l1 do
  68.     m.write(" ")
  69.   end
  70.    -- 2eme (RotorsCP N34) --
  71.   m.setBackgroundColor(colors.black)
  72.   m.setCursorPos(2,6)
  73.   m.write("Rotors Speed:"..math.floor(r34*1))
  74.   m.setBackgroundColor(colors.blue)
  75.   m.setCursorPos(2,7)
  76.  
  77.   --local l2 = 0
  78.   l2 = r34 * (l-2) / 2000
  79.   print(l2)
  80.  
  81.   for i=1,l2 do
  82.     m.write(" ")
  83.   end
  84.  
  85.    -- 3eme (RotorsCP N29) --
  86.   m.setBackgroundColor(colors.black)
  87.   m.setCursorPos(2,10)
  88.   m.write("Rotors Speed:"..math.floor(r29*1))
  89.   m.setBackgroundColor(colors.blue)
  90.   m.setCursorPos(2,11)
  91.  
  92.   --local l3 = 0
  93.   l3 = r29 * (l-2) / 2000
  94.   print(l3)
  95.  
  96.   for i=1,l2 do
  97.     m.write(" ")
  98.   end
  99.  
  100.   sleep(1)
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement