the values of the sensor are not very stable and fluctuate a bit. Not too bad, but it will get better. Since I want to do the whole thing battery powered anyway and therefore have to use Deep Sleep, I thought of the following. After waking up, the values are determined several times within one minute and then simply calculate an average value for this measurement.
i had already written it, battery operation and deep sleep should also be included. I played a bit with the possibilities and the sensor goes to sleep after 70 seconds, but it doesn’t wake up properly. After the Deep Sleep phase I can see what’s happening by the power consumption. However, the power consumption is always about half as much as before the first deep sleep phase. Wifi can not be connected either.
is there a possibility to display the battery status of the sensor? I would like to realize this with a battery shield for the Wemos D1 mini. The A0 pin of the Wemos is already occupied by the humidity sensor…
in general I would like to interrupt the deep sleep somehow. That would make maintenance a bit easier.
I’m also not quite satisfied with the output on the display. There is certainly room for improvement.
So far my thoughts first. What are your thoughts about this project? What would you change in the code and why?
Maybe you have some ideas how to realize my wishes?
To the hardware choice: I chose the Wemos D1 mini (ESP8266) because I still had a few of them here and they were sufficient for what I had in mind.
Regarding your comments on the software:
I already tried a little bit with the filters but I didn’t get any result that would have fit. Hence my question in the forum if anyone had a tip.
Concerning the display I have to agree with you - it’s all quite subjective. But there must be a way to make a line break more elegant, right?
As I said, would be very grateful for helpful suggestions.
Anyone knows how to get the sleep state from the d1 mini? I can control the sleep/ota via MQTT but how can I get the current state (ON or OFF) of the sleep mode?
Like I want to create a button that shows ON when sleep mode is ON and OFF when it’s OFF.
Hey, I have the same problem at the moment. Could you update your current code and how you integrated it so that it I can see the state for the button.
Did you get the battery monitoring working? Thanks in advance!
Hey JAD…finally reading this post (two years later…haha). I’m putting together a soil moisture sensor using a Capacitive Soil Moisture Sensor v1.2 and an ESP32. I’d also like to be able to monitor the battery. I can get the sensor to deliver raw data to serial monitor, but the actual coding has me stumped. Any recommendations/suggestions? I’ve read your code but I’m not sure what’s needed/not needed with the different hardware.