Hi!
I’m trying to run a LidarLite v3 in PWM mode and measure with CAP. But found no working implementation for that.
Quick code investigations reveals that:
LidarLite’s driver publishes to distance_sensor
while reads data published by pwm_input
driver in /dev/pwmin0
.
pwm_input
driver in turn measures on GPIO_PWM_IN
with corresponding timer defined in board_config.h
.
This pin seems to be available on PPM RC
connector on the board.
There are 3 CAP pins available as well on pins GPIO_INPUT_CAP{1…3} with corresponding timers. But those are not used by any driver implementation in master branch.
Which is the best approach to make use of those CAPs for connecting LidarLite? I’m considering duplicating pwm_input
driver for those CAPs and rewriting LidarLitePWM driver to make use of this new pwm_input
driver. Maybe there is a better approach?
Next question is about i2c. I’ve tried connecting LidarLite to both I2C A
and I2C B
ports with no great success. It gives error on attempt to start the driver. That’s actually why I switched to PWM which is at least I can verify by oscilloscope working well. Does it matter whether I connect it to A or B port?