tommy2805

programma info macchinari ic2

Jan 3rd, 2022 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. os.loadAPI("ocs/apis/sensor")
  2.   prox = sensor.wrap("left")
  3.  
  4.   local target = prox.getTargets()
  5.  
  6. for tarName, _ in pairs(target) do
  7.     --fetch the detailed information table for the current target.
  8.     local details = prox.getTargetDetails(tarName)
  9.     for k, v in pairs(details) do
  10.         print(tostring(k)..": "..tostring(v))
  11.     end
  12. end
Add Comment
Please, Sign In to add comment