This repository was archived by the owner on Nov 3, 2022. It is now read-only.

Description
I measured the power consumption of the sensor in a setup with an ES8266 NodeMCU and found it to use (on average) 80mA. One of the main reasons for the high power consumption is the WiFi that is always on. Therefore, using a battery as power source is not suitable except you want to change the battery very often. This is a problem when there is no outlet nearby or you don't want to use a cord. According to the docs of the sensor it should be possible to use the deep sleep mode of the ESP and wake it up when someone passes the sensor:

I'll just leave this here as a suggestion for further development of the algorithm 🙂 (Maybe I am able to find a solution on my own, but I have to learn a lot about ESP programing until I reach this point)
Link to the docs: https://www.st.com/resource/en/user_manual/dm00474730-vl53l1x-api-user-manual-stmicroelectronics.pdf