Using the VL53L1X without the Qwiic Sheild!

Hello!

I wanted to find out the steps to interface with the VL53L1X without using the Qwiic shield. I’m working a project right now that involves using at least 6 distance sensors and we have no aversion to soldering so we would prefer to just use the built in pin outs on the VL53L1X. The Sparkfun VL53L1X sensor works absolutely perfectly when using the Qwiic shield, but I haven’t been able to get it to work without it.

Something that I think is one of the main issues is that the example code provided in the library explicitly expects there to be a Qwiic shield so I’m unsure of how to write my arduino code in a way that would work with just using the pins. I’m assuming that is is possible to get readings from the VL53L1X without the Qwiic library because the individual pins are provided but I wanted to ask here if anyone has a code sample that would allow me to work with it, since all I’ve been able to find is code that works specifically with the Qwiic library. Thanks!!

TL:DR Anyone have code samples for using VL53L1X without Qwiic shield?

The only thing that the Qwiic shield does is provide a level shifter between the 3.3v Qwiic sensor and the 5v Arduino, and a Qwiic connector. There shouldn’t be any difference in the software between using the Qwiic shield or using a 3.3v Arduino or a 5v one with a level shifter. The same library and user program should work. You can find the schematic for the Qwiic shield at https://cdn.sparkfun.com/assets/5/1/a/3 … no_v10.pdf

As for using multiple VL53L1X, you would need to either use multiple I2C interfaces (if your processor has it or you bit-bang them) or an I2C mux like the TCA9548A. That is because there is no way to change the I2C address that the VL53L1X uses.

/mike

Hi mattrossalbatross,

Mike is 100% correct here. I just wanted to add a bit more information. The Qwiic Shield just makes it easier to have multiple Qwiic devices attached to your Arduino in the standard Arduino Shield form-factor along with that level-shifting circuit. If you want to use the VL53L1X without a Qwiic shield, you can either solder to the pins broken out on the side of the breakout board or you can adapt the Qwiic connector to your standard jumper-wire connections with something like [this adapter cable. From there, just connect each wire/pin to the respective pin on your Arduino and you’re good to go.

Just make sure to power the board from the 3.3V pin and not the 5V since it runs at 3.3V. The other pins are all open-drain so it is not 100% necessary to worry about level shifting the I2C signals. The INT and SHUT pins are also okay to connect directly to your Arduino since both of those are active low and are pulled up to 3.3V by pull-up resistors on the breakout. You would only need to worry about level shifting the I2C lines if you have another I2C device on the same bus that operates at a different logic (eg. 5V or 1.8V).](https://www.sparkfun.com/products/14425)