[SOLVED] code a programs for Dobot Magician in Python?


#1

Hi !

I have a question.
I do not understand how to write a code for Dobot Magician in Python on Lynux.

I can search and connect a Dobot Magician but that all.

I saw in the Demo for python there is

def GetPoseTask():
    pos = dType.GetPose(api)
    threading.Timer(0.2, GetPoseTask).start()
threading.Timer(0.5, GetPoseTask).start()

And sometimes I can see :

def PeriodicTask():
  dType.PeriodicTask(api)
  threading.Timer(0.05, PeriodicTask).Start()
theading.Timer(0.1, PeriodicTask).Start()

What are those lines for ?
Can someone tell me what is the main skeleton for a dobot program ?

Thank you !