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

Is there a way to change sample rate for PWM code? Also code restart? #29

Open
ccz359 opened this issue Oct 4, 2022 · 1 comment
Open

Comments

@ccz359
Copy link

ccz359 commented Oct 4, 2022

Hello @jmseitz ,

I'm using the LidarLite v3HP with an Arduino Uno. The device is wired using the PWM wiring diagram in the manual. I have installed the PWM 'get distance' code on the Arduino, and it is working great. However, I only need a 10Hz sample rate, not 400Hz for my application.

Is there a way to reduce the sample rate in the code without re-wiring the system?

I also noticed the system crashing when gently moved or bumped. My application requires the system be mounted to moving parts, is there a way to restart the Lidar periodically in the code?

Thank you!

@BradWiseman
Copy link

If you are using the PWM functionality, I think you can most easily reduce the rep rate by adding a software timer to the sample code. That would reduce the rep rate without requiring any changes to the wiring.

It's unclear to me why bumping the system would cause a crash. Are you sure your connections are not intermittent in a way that would interrupt them when the system is bumped? There is no soft reset available on the LIDAR-Lite v3HP, but you could cycle the power enable pin if you need to externally apply a signal to reset the device.

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