You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The example program is included in the SDK for two reasons, to allow you to start communicating with the sensor and to serve as a starting point for creating your own application. 

This is the algorithm implemented by the program.

  1. Initialize the sensor.
  2. Initiate signal handler (CTRL+C for shutdown).
  3. Create a new connection to device using HID Pipe.
  4. Connect to device using connection from step 3.
  5. Read response from connection.
  6. Optional: Search for platform device.
  7. Search for the sensor.
  8. Send command Set Operation Modes to the sensor.
  9. Loop until interrupt signal from user (CTRL+C).
    1. Read incoming message.
    2. Dump incoming message (display it for the user).
    3. If incoming message is OperationModesMessageType
      1. Send command Get Resolution to the sensor.
    4. If incoming message is ResolutionMessageType
      1. Send command Get Mcu Unique Identifier to the sensor.
    5. If incoming message is McuUniqueIdentifierMessageType
      1. Send command Set Enable to the sensor.
  10. Disconnect connection.
  11. Free up connection memory.
  12. Uninitialize the sensor.

  • No labels