Skip to content

Instantly share code, notes, and snippets.

@seongyooncho
Last active January 22, 2020 02:38
Show Gist options
  • Save seongyooncho/55d1dbe616b77a626f1b29273c7e043d to your computer and use it in GitHub Desktop.
Save seongyooncho/55d1dbe616b77a626f1b29273c7e043d to your computer and use it in GitHub Desktop.
mems

bool setAngle(double x, double y, long timeout)

Set angle of MEMS mirrors. It returns when MEMS mirror finishes targeting. This method is synchronous.

  • Return value: true when setting angle successfully, false when timeout occured or otherwise.
  • x: Radian angle in x axis.
  • y: Radian angle in y axis.
  • timeout: timeout in microseconds.

(Optional) bool getAngle(double& x, double& y)

Return current angle of MEMS mirrors. This method synchronous.

  • Return value: true when getting angle successfully, false otherwise.
  • x: Radian angle in x axis.
  • y: Radian angle in y axis.

bool getDistance(double& distance, double& variance)

Measure distance using laser and TOF sensor. This method is synchronous.

  • Return value: true when getting distance successfully, false otherwise.
  • distance: Distance in meters
  • variance: Variance of measurement. It is optional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment