20 lines
589 B
C
20 lines
589 B
C
#ifndef MOISTURE_SENSOR_H
|
|
#define MOISTURE_SENSOR_H
|
|
|
|
#include <stddef.h>
|
|
|
|
/*
|
|
* Moisture Detection 2: the AG-01 sensor, now sending a time with each level.
|
|
* Given; do not edit. Call sensor_start() once, then sensor_has_next() before
|
|
* each reading, and read that reading with sensor_time() and sensor_level().
|
|
*/
|
|
|
|
void sensor_start(unsigned int seed, int readings);
|
|
int sensor_has_next(void);
|
|
int sensor_time(void);
|
|
int sensor_level(void);
|
|
|
|
/* Compares what you stored with the valid readings the sensor sent. */
|
|
void sensor_check_log(int times[], int levels[], size_t count);
|
|
|
|
#endif
|