Throughout this past week, I was able to use all the knowledge collected from the previous weeks which I have discussed in my previous blogs and generate a table that lists all the I2C communication which happens sequentially between the microcontroller and the Vl53L1X sensor. I added Serial.print functions within the functions of the Platform class from the ST’s library. The reason to do so was that the Platform functions act as a gate between the ST’s API and I2C calls. Therefore, the added print functions print out every single internal index call and the amount of data that is being transferred in the I2C lines during the distance reading run time. Using this method, I was able to monitor every single byte transmitted to/from the sensors and I can get a good idea to write my code which will use only I2C commands to perform the same task!
Figure 1: Added print functions to the platform functions
Figure 2: Added print function to the microcontroller code
Figure 3 : Sample serial print output
Figure 4: Screenshot of the resultant table that cotaints all the I2C calls during the single distance read