Advertisement
sshikamaru

CC - test 1.15 - détection périphériques

May 6th, 2020
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1.  
  2.  
  3. --print(peripheral.isPresent("top")
  4. info = peripheral.getNames()
  5.  
  6. nb = 1
  7. table.foreach(info,function(a,b)
  8.     print(a.." / "..b)
  9.     nb = nb + 1
  10.     if nb == 16 then
  11.         print("tapez n'importe quelle touche pour continuer")
  12.         event, p1 = os.pullEvent("key")
  13.         nb = 0
  14.         term.clear()
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement