garmin / LIDARLite_Arduino_Library

High-performance optical distance sensing.
Apache License 2.0
181 stars 84 forks source link

Possible to read Control Registers in PWM mode? #21

Open Eileenmc opened 4 years ago

Eileenmc commented 4 years ago

We're using the Lidar Lite v3 HP configured in PWM to an Arduino Uno and would like to be able to read the control registers, for example, Health Status in the serial monitor. Is this possible? Looking through the Operations Manual and Tech specs isn't clear if the registers can only be used in I2C mode. Thank you in advance for your help with this!

Eileenmc commented 4 years ago

Gave some thought to this last night after I posted the above question. The issue is that we want to use the lidar in PWM mode but also want to be able to read the registers while its running. Is the solution using two arduino's - one to communicate with the Lidar in PWM as the master and the other communicating with it in I2C as slave?

jmseitz commented 4 years ago

You can utilize TRIGGER / MONITOR connections and I2C connections to the v3HP, simultaneously. The slave peripheral inside the v3HP continues to operate during PWM mode, allowing full access to the device's register set. You could use a separate Arduino to do this if you prefer, but both interfaces can be managed by a single Arduino.