Jump to content

planetx.gesture

From Compy Docs

Reads the gesture made over a PlanetX gesture sensor (such as EF05020) since the last call, as seen facing the sensor with its socket on the left, as a number from 1 to 9, or 0 if there was none.

Function

Synopsis

planetx.gesture()

Returns

A number corresponding to a gesture relative to the sensor as pictured below:

  1. right,
  2. left,
  3. up,
  4. down,
  5. forward,
  6. backward,
  7. clockwise,
  8. counter-clockwise,
  9. wave,

or 0, if no gesture has been detected since the last call.

Connector on the left, sensor facing the user

An error is raised if no sensor answers.

See Also