2025-11-05 2:27 PM
Hello, I am currently trying to write code for the I2C communication with the VL53L1-SATEL board. I was trying to confirm that the I2C was working by reading some registers mentioned in the VL53L1 Datasheet, those being 0xC0, 0xC1, 0xC2, 0x51, and 0x61. I was never able to get actual data from these registers. I have since found some example code that when I run I am able to read distance but when I try to read those registers in the example code I still am unable to get any of the data that is meant to be in those registers and some I get just zero while others I get the wrong values. I am wondering if the info in the datasheet about those registers is wrong or if I am doing something wrong along the way. A important note is that I am also reading from 0x010F using the same command which outputs 234, 0xEA in hex, but I am unable to see anywhere if that info is right or wrong.
Thanks,
Carson
2025-11-09 3:12 PM
Here is how do do this the easy way.
first buy the Nucleo-F401RE - they are very inexpensive. Somethiing like $10 depending on who you buy them from.
Then - using jumper wires - wire up the satel board.
Download the VL53L1 ULD (ultra light driver) along with the Evaluation code.
Use the eval code to prove your wiring all works.
Then build the example code in the ULD driver and give that a shot. You will need the Developement environemnt - but it's free from ST - just like the Eval software and the ULD driver itself.
Once you get the example code in the driver working, insert some code in the I2C_read and I2c_write functions.
If you are clever you can also put print statements into the VL53 functions so you end up with The function, and the resulting I2C writes and reads.
From there everything should make sense and you've only invested $10 and some time.
Good luck,
- john
2025-11-10 7:28 AM
At this point I have the breakout board working completely, but still get no information from the registers mentioned in the datasheet. So I'm just confused why I get no info from those but the board works fine. No complication with setting it up right.
2025-11-10 10:55 PM
Hi
if you just want to confirm if I2C read/write is correct, you can use below code for function check.
2025-11-12 7:33 AM
Sorry let me be more specific. I know that my i2c read and write works, I can get accurate distance data from the board and properly configure the board. My specific question is why the registers mentioned in the datasheet: 0xC0, 0xC1, 0xC2, 0x51, and 0x61, don't output the value that is stated in the datasheet after I do a reset.