I want to measure the distance by two sensors named Lidar-lite v3 for counting pedestrians .
Also, to prevent the interference of these two Lidar-lite, I want to measure alternately.
Lidar-lite1 measure the distance for 50ms
Lidar-lite2 measure the distance for 50ms
Lidar-lite1 measure the distance for 50ms
・
・
・
I wrote a code to check the power control of Lidar-lite v3 as shown below, but it continues to measure.
The main problem is how to switch its power on/off.
I can`t understand the content about 0x65 written in datasheet.
0x65 is the register address about its power control.
Could someone help me with a code or a solution of this?
I pay for this 40$ by paypal.
if you can, I would appreciate it if someone tell me how to measure by two Lidar-lites alternately as I write above.
I`m in Japan.
The data sheet mentions an enable pin. Did you connect those? If so, to which Arduino pin? This would be the easiest way to switch a scanner on/off, and also to control this in software.
Those scanners are on the same I2C address? Or different address? If the same address the enable pin is the only way to ensure which scanner you're talking to.
Please post link to data sheet. I really need to see the data sheet to understand how these things work.
Oh, I never come up with the idea you tell me.
Now,I connect Lidar-lite v3 like the image I attach.
Those scanners are on the same address when I connect them to arduino UNO.
But, I wrote a program to change the address to new one.
So, they have diffrent addresses when I use them.
This is the link of the datasheet of Lidar-lite v3.
The snippet you copy explicitly recommends using the enable pin - but I2C commands should work.
Time to start preparing dinner for me - I'll have to look at it later tonight.
Reading the data sheet it seems a measurement is only done upon request (i.e. writing 0x04 to register 0x00).
Switching of the device, or putting it in sleep mode, should not be necessary. The data sheet (page 5, "Burst Measurements and Free Running Mode") mentions the default is to take just a single measurement when the command is given to do so.
Anyway, cleaned up the code, added support for multiple devices (each on a unique I2C address), and moved it to a separate function so you can much easier reuse it.
The code compiles and I'm quite positive will work (I've followed the data sheet for the registers - it seems your code for a single device is correct) but can't test it as I don't have the exact device here.
Anyway, cleaned up the code, added support for multiple devices (each on a unique I2C address), and moved it to a separate function so you can much easier reuse it.
But then forgot to post it... Or are you waiting for the $40?
Yes, waiting. Expecting it later tonight.
And then hoping it works; can do just so much by looking at the spec sheet (which at points is not exactly easy to understand).