Open Storm
Functions
decagon.c File Reference

Implements functions for Decagon GS3 soil moisture sensor. More...

#include "decagon.h"
Include dependency graph for decagon.c:

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

Detailed Description

Implements functions for Decagon GS3 soil moisture sensor.

Author
Brandon Wong, Matt Bartos, Ivan Mondragon
Version
TODO
Date
2017-06-19

Function Documentation

uint8_t Decagon_Take_Reading ( DecagonGS3 decagon_reading)

Takes a reading with the Decagon GS3 sensor.

Returns
DecagonGS3 struct containing sensor readings

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
labelsArray to store labels corresponding to each sensor reading
readingsArray to store sensor readings as floating point values
array_ixArray index to label and readings
take_averageWhether to take average or not
  • 0: Take first valid reading
  • 1: Take average of valid readings
decagon_loopsNumber of readings taken on each call.
max_sizeMaximum size of label and reading arrays (number of entries)
Returns
(*array_ix) + number of entries filled

Here is the call graph for this function:

Here is the caller graph for this function: