hello mep2019. you need a documentation of this code, or you created this code and the values read are wrong? what is happening?
i downloaded your code, but i don't have this sensor here, please describe your issues with more details.
somethings are a bit odd.
i'd recommend initializing communication and sensor outside the while loop.
also, i recomend using loop acquisition bigger than 2 seconds, in conformity with sensor datasheet to avoid overheating.
i can not develop this code, don't have this sensor here to test. but recently i gave some instructions that worked out for some colleagues.
first, get used to how the sensor works, reading its datasheet and using arduino libraries (they are good sources of information) as a guide:
here are the links for the answers i gave. check out if those can help you:
also, another possibility is to implement the library in your microcontroller main loop and use custom command to request information from the sensor.:
hope it helps