forked from sensebox/hydreon-rainsensor-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hydreon.h
39 lines (35 loc) · 1.02 KB
/
hydreon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
Hydreon Rainsensor Library for senseBox
*/
#if ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
#ifndef HYDREON_h
#define HYDREON_h
class HYDREON
{
public:
HYDREON(Uart &serial);
void begin(); // start sensor
void readAllData(); // read all Data
void setHighResolution(bool high); // set to HighResolution mode if true
void temporaryReset(); // temporary reset past sensor measurements
float getAccumulation(); // get Accumulation since last request as float
float getEventAccumulation(); // get Event Accumulation as float
float getTotalAccumulation(); // get total Accumulation as float
float getRainfallIntensity(); // get rainfallIntensity as loat
String getDataString(); // get data String
private:
float accumulation;
float eventAccumulation;
float totalAccumulation;
float totalAccumulationTemp;
float rainfallIntensity;
int startIndex;
int endIndex;
String data;
Uart &sensor;
};
#endif