Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single shot in standby mode #11

Open
hbredin opened this issue May 14, 2023 · 1 comment
Open

Single shot in standby mode #11

hbredin opened this issue May 14, 2023 · 1 comment

Comments

@hbredin
Copy link

hbredin commented May 14, 2023

I am trying to trigger a single shot detection in standby mode.

Documentation says:

Address Name Default Description
0x01 Mode 0x01 (continuous) Mode. See mode table below.
0x03 Single shot 0x00 Trigger a single-shot inference. Only works if the sensor is in standby mode.

I therefore

  1. set the sensor to standby mode by writing 0x00 to address 0x01 (this seems to work)
  2. trigger a single shot by writing 0x01 to address 0x03

Then, what shoud I do to read the result?

Reading the data works fine in continuous mode but does not return anything (empty list of faces) after triggering the single shot in standby mode.

@hbredin
Copy link
Author

hbredin commented May 14, 2023

I think I understand what happens.

I did not wait long enough for the single shot to be completed before reading the detection results. Adding a bit of delay before reading the data does work as expected.

For others impatient like me, here is a (the?) solution:

  1. set the sensor to standby mode by writing 0x00 to address 0x01 (this seems to work)
  2. trigger a single shot by writing 0x01 to address 0x03
  3. wait a second
  4. read the result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant