Open Storm
atlas_wq_sensor.h
Go to the documentation of this file.
1 
8 #ifndef ATLAS_WQ_SENSOR_H
9 #define ATLAS_WQ_SENSOR_H
10 #include "project.h"
11 
12 #define CONDUCTIVITY 100
13 #define TEMPERATURE 102
14 #define DO 97
15 #define ORP 98
16 #define PH 99
17 
18 #define ATLAS_MAX_ITER 100
19 
20 struct{
21  float ec;
22  float tds;
23  float sal;
24  float sg;
25 }typedef con_reading;
26 
34 int atlas_sensor_sleep(uint8 sensor_address);
35 
43 int atlas_sensor_calibrate(uint8 sensor_address);
44 
54 uint8 atlas_take_single_reading(uint8 sensor_address, float *reading);
55 
64 uint8 atlas_take_con_reading(con_reading *reading);
65 
76 uint8 zip_atlas_wq(char *labels[], float readings[], uint8 *array_ix, uint8 max_size);
77 
78 #endif
79 // Additional functionality
uint8 zip_atlas_wq(char *labels[], float readings[], uint8 *array_ix, uint8 max_size)
Inserts current values of water quality measurements into labels and readings arrays.
Definition: atlas_wq_sensor.c:140
uint8 atlas_take_single_reading(uint8 sensor_address, float *reading)
Take a single reading from Atlas sensor in I2C mode. Used for Temperature, DO, ORP and PH...
Definition: atlas_wq_sensor.c:43
int atlas_sensor_calibrate(uint8 sensor_address)
Calibrate Atlas sensor using single-point method.
Definition: atlas_wq_sensor.c:27
uint8 atlas_take_con_reading(con_reading *reading)
Take a single reading from Atlas sensor in I2C mode. Used for conductivity sensor.
Definition: atlas_wq_sensor.c:85
int atlas_sensor_sleep(uint8 sensor_address)
Put Atlas I2C sensor into sleep mode.
Definition: atlas_wq_sensor.c:12