Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
SensorTask.h
Go to the documentation of this file.
1#ifndef WOMBAT_SENSORTASK_H
2#define WOMBAT_SENSORTASK_H
3
4#include <ArduinoJson.h>
5
6constexpr size_t MAX_SENSORS = 10;
7static constexpr uint8_t MAX_VALUES = 32;
8
9void init_sensors(void);
10bool read_sensor(const char addr, JsonArray& timeseries_array);
11void sensor_task(void);
12
13#endif //WOMBAT_SENSORTASK_H
bool read_sensor(const char addr, JsonArray &timeseries_array)
Read a single SDI-12 sensor and add its values to timeseries_array.
Definition: SensorTask.cpp:45
static constexpr uint8_t MAX_VALUES
Definition: SensorTask.h:7
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 upli...
Definition: SensorTask.cpp:166
constexpr size_t MAX_SENSORS
Definition: SensorTask.h:6
void init_sensors(void)
Scans the SDI-12 bus and fills in the sensors object.
Definition: SensorTask.cpp:30