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

Lost Sync With Device #611

Open
Hateley123 opened this issue Feb 8, 2023 · 1 comment
Open

Lost Sync With Device #611

Hateley123 opened this issue Feb 8, 2023 · 1 comment

Comments

@Hateley123
Copy link

I am trying to use a Teensy 4.1 as a clock when connecting lidar, cameras and IMUs. However, whenever I tried to send an nmea message through my serial 1 port, it takes too long and as a result my system desyncs. my code is copied below

Definitions:
#define GPSERIAL Serial1 // $GPRMC

Code:
if (sendNMEA == true) {
char time_now[7], date_now[7];
time_t t = nh.now().sec;
sprintf(time_now, "%02i%02i%02i", hour(t), minute(t), second(t));
sprintf(date_now, "%02i%02i%02i", day(t), month(t), year(t) % 100);
String nmea_string = F("GPRMC,") + String(time_now) +
F(",A,4365.107,N,79347.702,E,022.4,084.4,") +
String(date_now) + ",003.1,W";
String chk = checksum(nmea_string);
nmea_string = "$" + nmea_string + "*" + chk + "\n";
GPSERIAL.print(nmea_string);
sendNMEA = false;
digitalWriteFast(PPS_PIN, LOW); // minimum pulse duration required by LiDAR is 10 us
//nh.loginfo(nmea_string.c_str());
}

The code works as I am able to obtain a nmea_string. I have tested this through outputting the string, but I am unable to pass through the lidar.

I am using:
VLP-16 Puck Connecting the PPS to the GPS Sync Pulse and connecting GPSERIAL to GPS Serial Reciever (manual:https://velodynelidar.com/wp-content/uploads/2019/12/63-9243-Rev-E-VLP-16-User-Manual.pdf)

Any assistance would be appreciated.

@Hateley123
Copy link
Author

using noetic btw

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