Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
SensorTask.cpp File Reference
#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>
Include dependency graph for SensorTask.cpp:

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 &timeseries_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...
 

Macro Definition Documentation

◆ SDI12_DATA_PIN

#define SDI12_DATA_PIN   GPIO_NUM_21

◆ TAG

#define TAG   "sensors"

Function Documentation

◆ dpi12()

DPIClimate12 dpi12 ( sdi12  )

◆ init_sensors()

void init_sensors ( void  )

Scans the SDI-12 bus and fills in the sensors object.

◆ read_sensor()

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 ( SDI12_DATA_PIN  )

◆ sensor_task()

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.

Variable Documentation

◆ sensors

sensor_list sensors

The ID information of each sensor found on the SDI-12 bus.