|
Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
|
#include <Arduino.h>#include "SensorTask.h"#include "DeviceConfig.h"#include "Utils.h"#include "globals.h"#include "ulp.h"#include "sd-card/interface.h"#include "power_monitoring/battery.h"#include "power_monitoring/solar.h"#include <esp_log.h>#include <freertos/FreeRTOS.h>#include <dpiclimate-12.h>#include <SPIFFS.h>Macros | |
| #define | TAG "sensors" |
| #define | SDI12_DATA_PIN GPIO_NUM_21 |
Functions | |
| SDI12 | sdi12 (SDI12_DATA_PIN) |
| DPIClimate12 | dpi12 (sdi12) |
| void | init_sensors (void) |
| Scans the SDI-12 bus and fills in the sensors object. More... | |
| bool | read_sensor (const char addr, JsonArray ×eries_array) |
| Read a single SDI-12 sensor and add its values to timeseries_array. More... | |
| void | sensor_task (void) |
| Read all sensors, put the readings in a JSON message and save the JSON to a file on SPIFFS to be uplinked later. More... | |
Variables | |
| sensor_list | sensors |
| The ID information of each sensor found on the SDI-12 bus. More... | |
| #define SDI12_DATA_PIN GPIO_NUM_21 |
| #define TAG "sensors" |
| DPIClimate12 dpi12 | ( | sdi12 | ) |
| void init_sensors | ( | void | ) |
Scans the SDI-12 bus and fills in the sensors object.
| bool read_sensor | ( | const char | addr, |
| JsonArray & | timeseries_array | ||
| ) |
Read a single SDI-12 sensor and add its values to timeseries_array.
| SDI12 sdi12 | ( | SDI12_DATA_PIN | ) |
| void sensor_task | ( | void | ) |
Read all sensors, put the readings in a JSON message and save the JSON to a file on SPIFFS to be uplinked later.
| sensor_list sensors |
The ID information of each sensor found on the SDI-12 bus.