I am using the VL53L3CX distance sensor for a project and I am wondering if it's possible to create my own library functions. The MCU I am using is the ATmega328PB XPlained Mini from Microchip, which only has 32KB of flash memory. The API library that I downloaded is way bigger than that, so I am wondering if I can just limit the API file to just a few functions:
I am able to create my own functions to do I2C read and write (I was able to get 0xEA and 0xAA to reference register 0x010F and 0x0110 respectively). My question is how can I setup the functions to get the I2C working? Would I have to go through all the registers (and if so, what are the registers), or would it be better to use a specific setup? Are there a specific file, headers, library that I would have to use that is less than 32KB?
I am also wondering if the VL53L0X is using the same registers as the VL53L3CX, I did a search on if anyone created a library suited for low memory MCU and this one looked promising: https://github.com/michael-betz/vl53l0x-non-arduino/tree/master
Could I use this for the VL53L3CX?
Forgive me for asking this question, but I am pretty new to this and it's my first time working with I2C and MCU. Thank you for taking the time to answer.
To get better accuracy and longer ranging ability, L3CX is using a new ranging data processing method, that's why the Flash size is much more than L0CX. actually, I don't have good idea to reduce the Flash size. as the ranging data needs post process functions, which inside API drivers, not the simple register read, write.
And one more information is L0CX register is different with L3CX.