2022-12-15 07:20 AM
Hello,
I've got a question.
I'm trying to interface two VL53L0x ToF sensors with an ATmega328p board. This worked fine in the arduino IDE with the beautiful Adafruit library. Unfortunately this library does not work in AVR C so I'm trying to create the whole start up sequence and everything on my own.
This has proven to be very difficult however. I have found the API and some other libraries but I can't get them to work.
Does anyone have experience with AVR C and I2C?
2022-12-21 07:27 AM
This sensor and your processor have been around a while. Give GitHub a try. And if you don't find the VL53L0X you can subsitute the i2C interface for any of the VL53L sensors.
I'm sure someone has done it - and proudly posted their work.
Of course if you find something that helps, you are kind of honor bound to return the favor if you can.
2022-12-26 06:32 AM
Hi John,
Thank you for your reply.
I have looked around on the internet for inspiration and I have found three or four different libraries. But I have not been able to get them to work with the ATmega328p. I suspect that I have to set the correct registers and things like that but I've not been able to find the necessary information to do so.
So that's why I decided to make a post to this forum. Maybe I have overlooked some GitHub repository or a previous forum post but I can't find the information necessary to complete my project.
If you're interested in the libraries I've found here are some links:
https://github.com/lamik/VL53L0X_API_STM32_HAL/tree/master/Drivers/VL53L0X
https://github.com/pololu/vl53l0x-arduino
https://github.com/bitbank2/VL53L0X
https://github.com/yetifrisstlama/vl53l0x-non-arduino
Here's the datasheet for the VL53L0X, it might make looking up information a bit more convenient for you.