2025-07-02 11:13 AM - last edited on 2025-07-03 6:35 AM by Amel NASRI
Hello everybody!
I would really appreciate if you find some time to help me with my project.
I want to take distance data from VL53L5CX module, which I have connected with Nucleo L476RG board exactly as in the picture uploaded.
I just want this data to be printed in serial port, 4x4, 8x8 matrix would be great. Need some real help step by step, also with the scripts in CubeIDE as I am a new enthusiast in this whole thing.
Thanks in advance,
EriolThese are the exact pin connections(L476RG board)
2025-07-02 12:28 PM
Welcome to the forum.
@Eriol wrote:I am a new enthusiast in this whole thing.
What do you mean here by, "this whole thing" ?
@Eriol wrote:with the scripts in CubeIDE
It sounds like you are not familiar with C programming? C Programs aren't usually described as "scripts".
In that case. it might be best to start with that on a PC - most microcontroller materials will assume (at least) a basic understanding of C.
Also, learning C on a microcontroller adds a few complications not found on a PC.
Here are some learning & reference materials for C:
https://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/
Some microcontroller getting started tips:
2025-07-02 12:44 PM
Hi Andrew, thanks for replying!
I mean I am new with CubeIDE and Nucleo boards. Also I am not much familiar with C, as you mentioned.
Tried some programing, but still can't initialise the sensor. I have added the necessary drives, vl53l5cx uld library, still can't find the solution. Thats why I asked a step by step guidance, maybe a main.c file that works, or if you can help with a similar project.
Thank you!
2025-07-02 2:07 PM
@Eriol wrote:I mean I am new with CubeIDE and Nucleo boards. Also I am not much familiar with C,
Then I would certainly suggest that this is a bit ambitious as a starting point.
I would strongly suggest that you start with the basics to gain a good understanding of the part, the tools, etc:
2025-07-02 3:37 PM
2025-07-03 7:36 AM
Eriol -
You are kind of diving into the deep end here.
One thing you could do would buy the NucleoF401RE board and start there. (They are very inexpensive.)
The reason for starting there is that your wiring diagram works on that board, and you can download the code.
Once you get that to work, you can look for differences.
The trouble is that those positions on the F401RE board might not go to the same GPIO on the L476 board.
Another option - if you are good at looking at schematics, is to compare the two Nucleo boards. Make sure the GPIO you have assigned on the chip is the same one that ends up at the pin on the connector.
I always recommend starting with the F401RE boards simply because there are so many moving parts, it's better to practice on a working system so you can see how it's supposed to work.
The to migrate to the L476 board, use the STM32CubeIDE and start another project right next to your F401RE.
Once you get the I2C working and the prints working, getting the sensor to work will be a matter of lifting the LPn pin.
Good luck,
- john