Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
|
Solar power monitoring handler. More...
#include <solar.h>
Static Public Member Functions | |
static void | begin () |
Setup INA219 IC to monitoring battery voltage and current. More... | |
static double | get_voltage () |
Get the voltage of the solar. More... | |
static float | get_current () |
Get the current flowing from the solar panel. More... | |
static void | sleep () |
Puts the INA219 IC in a sleep mode. More... | |
static void | wakeup () |
Wakes up the INA219 IC. More... | |
Static Private Attributes | |
static const uint8_t | solarAddr = 0x40 |
Default I2C solar address (cannot be changed without modifying PCB) More... | |
Solar power monitoring handler.
A INA219 IC is used to monitor solar voltage and current. When using the Adafruit_INA219 library this IC requires a 1 ohm resistor across its positive and negative inputs.
|
static |
Setup INA219 IC to monitoring battery voltage and current.
As the solar panel has a maximum voltage of 21V a calibration factor is set to a lower resolution.
|
static |
Get the current flowing from the solar panel.
If the IC is not initialed this function will return -1.0.
|
static |
Get the voltage of the solar.
If the IC is not initialed this function will return -1.0.
|
static |
Puts the INA219 IC in a sleep mode.
The IC will consume around 6 uA when in sleep mode.
|
static |
Wakes up the INA219 IC.
|
staticprivate |
Default I2C solar address (cannot be changed without modifying PCB)