Yes it works with the example code.
I am using Arduino. The code I pasted before was for Arduino microcontroller.
The function “measure()” is the one I copied from the example of this site.
I turn on/off the sensore using a digital I/O of Arduino and it works only if I use 100ms of delay. If I turn of the sensor and use 3600s (1hour) of delay it does not work. I also tried with one minute , 30s and it does not work.
I tested this simple code and it works only if I use a delay of 100ms. Why?
void loop()
{
Serial.println("TURN ON!");
turnOnSensor();
measure();
Serial.println("TURN OFF!");
turnOffSensor();
delay(100);
}
I would like to have a measure every 30minutes, then i would like the sensor OFF for 30 minutes.
What am I missing?
In the link I posted it looks that in SEN0211 is included the sensor and also a little board. Is it possible that the board is the ADC and it is already included in SEN0211?
I don't use RTC. If i configure Arduino timer, it works to do any action (I print something) but it doesn't work to measure distance.
I had an idea both to measure every hour and also to save sensor life.. I will power the sensor every hour using a digital output. It looks that the sensor absorbs <15mA and each raspberry digital output can give up to 20mA.
I will test it in next days.
yes , the example code works perfectly.
I noticed that the sensor stops working after few months. Is it possible that reading fast 24h creates some damage?
I would like to try to read just once a hour. Is there a way ?