change address of LIDAR-Lite v3

Hello.
I try to count pedestrians using one of ToF sensors named LIDAR-Lite v3 with arduino.
Then, I want to measure the distance by them and move it alternately.
To realize this, I have to assign different address and I should command separately.
But now I need someone`s help.

Here is the code I wrote to change its address.
(This code is for one LIDAR-Lite connected to arduino UNO)
But, its address is still the default one(0x62).
What is wrong with my code?
I would appreciate if someone gives me a hand.

#include<Wire.h>

#define SET            0x00
#define ADDRESS        0x62
#define NEW_ADDRESS    0x63
#define READHIGH       0x16
#define READLOW        0x17
#define SERIALNUM      0x96
#define WRITEHIGH      0x18
#define WRITELOW       0x19
#define WRITEADD       0x1a
#define DISABLE        0x1e
int value1 = 0;
int value2 = 0;

void setup() {
  // put your setup code here, to run once:
Wire.begin();
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Wire.beginTransmission((int)ADDRESS);
Wire.write(SET);
Wire.endTransmission();
delay(20);

Wire.beginTransmission((int)ADDRESS);
Wire.write(SERIALNUM);
Wire.endTransmission();
delay(20);
Wire.requestFrom((int)ADDRESS, 2);
value1 = Wire.read();
value2 = Wire.read();

Wire.beginTransmission((int)ADDRESS);
Wire.write(WRITEHIGH);
Wire.write(value1);
Wire.endTransmission();
delay(20);

Wire.beginTransmission((int)ADDRESS);
Wire.write(WRITELOW);
Wire.write(value2);
Wire.endTransmission();
delay(20);

Wire.beginTransmission((int)ADDRESS);
Wire.write(WRITEADD);
Wire.write(NEW_ADDRESS);
Wire.endTransmission();
delay(20);

Wire.beginTransmission((int)ADDRESS);
Wire.write(DISABLE);
Wire.write(0x08);
Wire.endTransmission();
delay(20);

Thank you.

Post a link to the documentation and/or instructions describing how to change the address.

jremington

Thank you for your reply.
And I`m sorry for missing the documents or introduction.

Here is the image which is written about changing address of this sensor.

And,this is the full datasheet of sensor.

※ 0x62 is the default address of this sensor.

Thank you for providing the link to the documentation.

Now, please edit your code to add comments describing what YOU think each part should be doing to change the I2C address. For example, why do you begin by appearing to write a data acquisition command called, helpfully enough, "SET"? Normally, another byte would be sent following this command.

(Hint, it is good programming practice to use meaningful variable names and add accurate comments).

  // put your main code here, to run repeatedly:
Wire.beginTransmission((int)ADDRESS);
Wire.write(SET);
Wire.endTransmission();
delay(20);

Note that all this should be in setup(), as you do NOT want the loop() function to be attempting to change the device address 10,000 times per second.

I recommend to very carefully study how the provided library code works, and to start with something very simple that tests basic communications, like acquiring the system status.

I try to count pedestrians using one of ToF sensors named LIDAR-Lite v3 with arduino.

A LIDAR measure distance, not pedestrians. You have NO idea what the signal was reflected by. ASSuming that it was reflected by a pedestrian is silly.