Hi !
I’m trying to measure the distance using three VL53L1X and Arduino UNO, but it doesn’t work. I would like to get advice on how to improve it. The sketch is vl531xtriple.ino attached.
The two VL53L1Xs are working with the attached dualvl531x.ino sketch. The connection diagram is based on the attached sketch, and the XSHUT pin of the third VL53L1X is connected to pin 6 of Arduino UNO.dualvl531x.ino (1.6 KB)
I tried your 3-sensor program and it seemed to work for me. Note that the program you included in the text of your post and the program you attached as a file are different; the first uses pins 4, 5, and 6, while the second uses pins 2, 3, and 4. You might want to make sure your sensors are wired in a way that matches the program you’re using.
If you keep having trouble, could you post a picture of your setup that shows your wiring and explain in what way the program doesn’t work for you?
Thanks for the reply.
I tried to run the program again after correcting the difference between the attached program and the actual pins connected, but nothing appears on the serial monitor. I have checked that the connection between the PC and Arduino, board and serial port are correct. I have attached a program that uses three VL53L1X and a connection diagram for you to check.
Your program and wiring diagram both look fine. If you post some photos of your actual setup, I could try checking to see if there is anything that doesn’t match your wiring diagram or otherwise looks problematic. Have you been able to confirm that all 3 of your sensors work individually?
I think I only see 2 thin black wires going to the breadboard, so is it possible one of your sensors is missing a ground connection? The sensor boards themselves are not visible in your pictures, so if you post a picture of those, I can additionally check the connections on that end.
Sorry for the late reply. I’ve uploaded a picture of the whole circuit, sorry it’s hard to see, and the three sensors are connected to ground. I still can’t get it to work. Is there some other factor such as lack of power?
Have you verified that all of your ground wires are actually electrically connected in your latest setup? It looks like it’s possible the connections go the other way (in vertical columns) in the bottom section of your breadboard.
I would not expect power to be an issue since the VL53L1X generally only uses a few milliamps, which a standard Arduino Uno should easily be able to supply. However, you are not using our carrier boards, so we cannot offer any advice specific to getting those working, and I suggest you try contacting the manufacturer of your boards for help if you continue having trouble. (As I mentioned, your 3-sensor program seemed to work for me with 3 Pololu boards, so it does not appear to be a problem with your program or our library.)