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

External trigger issue #7

Open
Drayak335 opened this issue Feb 18, 2019 · 1 comment
Open

External trigger issue #7

Drayak335 opened this issue Feb 18, 2019 · 1 comment

Comments

@Drayak335
Copy link

During my tests I was not able to get the external trigger to work, after some tests using a usb to UART I noticed that its not needed to change to config mode the sensor.

commenting out the setConfigMode() calls worked for me.

At the end I used it as below.

// Set single scan mode (external trigger)
void TFMini::setSingleScanMode() {
  // not needed ->setConfigMode();
  // setting trigger source to external
  streamPtr->write((uint8_t)0x42);
  streamPtr->write((uint8_t)0x57);
  streamPtr->write((uint8_t)0x02);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x40);
}

// Send external trigger
void TFMini::externalTrigger() {
  // not needed -> setConfigMode();      
  // send trigger
  streamPtr->write((uint8_t)0x42);
  streamPtr->write((uint8_t)0x57);
  streamPtr->write((uint8_t)0x02);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x00);
  streamPtr->write((uint8_t)0x41);
}
@Chancylvania
Copy link

I can confirm that this is how it works. Don't know why this is the case

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

2 participants