Open Storm
Functions | Variables
decagon.h File Reference

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"
Include dependency graph for decagon.h:
This graph shows which files directly or indirectly include this file:

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.
 

Detailed Description

Declares 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: