Open Storm
|
Declares functions for Decagon GS3 soil moisture sensor. More...
#include <project.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "cytypes.h"
#include "sensors_uart_control.h"
#include "strlib.h"
Go to the source code of this file.
Functions | |
uint8_t | Decagon_Take_Reading (DecagonGS3 *decagon_reading) |
Takes a reading with the Decagon GS3 sensor. More... | |
DecagonGS3 | Decagon_Convert_Raw_Reading (char *raw_D) |
TODO: Not implemented. | |
uint8 | zip_decagon (char *labels[], float readings[], uint8 *array_ix, uint8 take_average, int decagon_loops, uint8 max_size) |
Inserts current values of decagon_reading into labels and readings arrays. More... | |
Variables | |
struct { | |
float dielectric | |
float temp | |
int conductivity | |
uint8 valid | |
uint8 err | |
} | DecagonGS3 |
Type definition for decagon GS3 sensor struct. | |
Declares functions for Decagon GS3 soil moisture sensor.
uint8_t Decagon_Take_Reading | ( | DecagonGS3 * | decagon_reading | ) |
Takes a reading with the Decagon GS3 sensor.
uint8 zip_decagon | ( | char * | labels[], |
float | readings[], | ||
uint8 * | array_ix, | ||
uint8 | take_average, | ||
int | decagon_loops, | ||
uint8 | max_size | ||
) |
Inserts current values of decagon_reading
into labels and readings arrays.
labels | Array to store labels corresponding to each sensor reading |
readings | Array to store sensor readings as floating point values |
array_ix | Array index to label and readings |
take_average | Whether to take average or not
|
decagon_loops | Number of readings taken on each call. |
max_size | Maximum size of label and reading arrays (number of entries) |