Showing results for 
Search instead for 
Did you mean: 

What do you think about this Reset Code Sample to reset sensor connected to esp8266 project ?

Associate II

I want a code to reset the sensor, and put it before all my routines so I can get the MCU and the sensor to re-synchronize.

That are the steps of the technique to reset find gpio pin has the ability to lift and low And Connect that pin to the Xshut input. 2.A bootup lower the GPIO, wait a few ms, then lift it. Wait a few ms for the sensor to boot, and carry on. Should fix you right up.

I find a code my colleague suggests that to me he uses it to for BME sensor but I want to use it for Vl6810X sensor This code is also prepared for hardware error (handled elswhere, by a simple if. ).

He told me : So if really not able to start it and variable Emergency_stop_all goes over 3 all functionality will be stopped for safety. (Is controling a 120L electric water heater. it has 2 BME280, using different address, on one almost 2m wire and still reliable. 1m of it is inside of a metal tube inside of the water heater, that acts as a shield.)

if (BME.getMode() != 3){




if (BME.getMode() != 3) Emergency_stop_all++;


if (two_sensor_is_present[0] && BME2.getMode() != 3){




if (BME2.getMode() != 3) Emergency_stop_all++;


So what do you think or suggest?

Associate II

any tips ?