In some of the photos in the tutorials there is a small battery icon, showing actually the battery level of the node. I've build a couple of esp8266-DHT22 humidity/temperature nodes using the provided arduino code (v.2), however there is no icon shown.
Is there a way to enable it?
How is the battery level measured?
By the way, did anyone have any progress with the battery life of the temperature node? I am looking i a way to put the node in sleep mode and transmit every half an hour.
zyrotron wrote: In some of the photos in the tutorials there is a small battery icon, showing actually the battery level of the node. I've build a couple of esp8266-DHT22 humidity/temperature nodes using the provided arduino code (v.2), however there is no icon shown.
Is there a way to enable it?
How is the battery level measured?
By the way, did anyone have any progress with the battery life of the temperature node? I am looking i a way to put the node in sleep mode and transmit every half an hour.
Thanks.
You see battery icon in user interface if you have property Status.Battery. It is automatically added to node if you call function sendBatteryLevel in ESP8266 EasyIoT library and set value between 0 and 100. If you are using WEB API then call
http://localhost/Api/EasyIoT/Control/Module/Virtual/N19S0/ControlBattery/10
Relace server address, node address and value with your settings.
To measure battery voltage level you have two options:
-If you are using battery directly connected to ESP8266 (no regulator) use getBatteryLevel () function in door/windoe example
github.com/iot-playground/Arduino/blob/m...or_window_sensor.ino
-if you are using voltage regulator, then connect resistor divider (two serial resistors) directly to battery VCC and GND. Then connect middle od resistor divider to analog input and in Arduino program measure voltage on this pin.