Hello @Robin2
I'm very sorry for what happened
My sincere apologies, I didn't merge branch where I implemented the library.
This is basically the same code but clean and reusable, I'm really really grieved about it, is not my intention waste your time in a meaningless way.
About the program grow, I actually made a test for every single component and all of the functions were tested alone, I also save some of the code that I use in the same repository and all work as expected when is used isolated.
About the snippet of code, I really didn't remember why I did it in that way (yeah, I should comment it

), I guess that the sensor re-sends my initial petition before the answer, but I'm not sure about it. but as I mentioned, it works when I tested it before.
I will rewrite the function from zero again, and then post the results