Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
solar.h
Go to the documentation of this file.
1
8#ifndef WOMBAT_POWER_MONITORING_SOLAR_H
9#define WOMBAT_POWER_MONITORING_SOLAR_H
10
11#include <Arduino.h>
12#include "Adafruit_INA219.h"
13
25private:
27 static const uint8_t solarAddr = 0x40;
28
29public:
30 static void begin();
31
32 static double get_voltage();
33 static float get_current();
34
35 static void sleep();
36 static void wakeup();
37};
38
39#endif //WOMBAT_POWER_MONITORING_SOLAR_H
Solar power monitoring handler.
Definition: solar.h:24
static double get_voltage()
Get the voltage of the solar.
Definition: solar.cpp:45
static void begin()
Setup INA219 IC to monitoring battery voltage and current.
Definition: solar.cpp:23
static float get_current()
Get the current flowing from the solar panel.
Definition: solar.cpp:75
static void sleep()
Puts the INA219 IC in a sleep mode.
Definition: solar.cpp:90
static const uint8_t solarAddr
Default I2C solar address (cannot be changed without modifying PCB)
Definition: solar.h:27
static void wakeup()
Wakes up the INA219 IC.
Definition: solar.cpp:99