ADux1020 gesture question

Hi Sir,


we have some question about ADux1020, could you help to check this, thanks you very much!

  1. We  found out that the rotation is very hard to recognize and we want to know that does ADI have related document to explain how to achieve or the method that make us show this function easily .
  2. Could ADI provide source code of algorithm to let us as reference. They could modify this base this.
  3. Is this source code in Black fin processor platform, if yes, we could use CCES to update the code in same platform.
  • Hello,

    Source code for the ADUX1020 driver and algorithm is not yet available but will be released at a later date.

    I can provide pseudocode for the gesture algorithm:

    Given data output of the sensor in four channels: xr, xl, yt, yb

    intensityThreshold = 500

    clickThreshold = 0.08

    event = False

    while data streaming:

       x = (xr-xl)/(xr+xl+0.00001)

       y = (yt-yb)/(yt+yb+0.00001)

       I = xr+xl+yt+yb

       if event is False:

          if I > intensityThreshold:

                i = 0

                event = True

                gestureStartX = x

                gestureStartY = y

       elif event is True:

          i += 1

          if i >= 5 and I < intensityThreshold:

             event = False

             gestureStopX = x

             gestureStopY = y

             m = (gestureStartY - gestureStopY)/(gestureStartX - gestureStopX)

             d = sqrt((gestureStartX - gestureStopX)^2 + (gestureStartY - gestureStopY)^2)

             if d < clickThreshold:

                gesture = 'click'


                if abs(m) > 1:

                   if gestureStartY > gestureStopY:

                      gesture = 'up'


                      gesture = 'down'

                elif abs(m) < 1:

                   if gestureStartX > gestureStopX:

                      gesture = 'left'


                      gesture = 'right'