mysensors.h 1.05 KB
Newer Older
Nelso Jost's avatar
Nelso Jost committed
1

Nelso Jost's avatar
Nelso Jost committed
2
3
4
5
6
7
#ifndef MYSENSORS_H
#define MYSENSORS_H

#include "Arduino.h"

String read_LDR();
Nelso Jost's avatar
Nelso Jost committed
8

Nelso Jost's avatar
Nelso Jost committed
9
#include "libs/DHT.h"
Nelso Jost's avatar
Nelso Jost committed
10
11
12
String read_DHT22_TEMP();
String read_DHT22_AH();

Nelso Jost's avatar
Nelso Jost committed
13
#include "libs/Adafruit_BMP085.h"
Nelso Jost's avatar
Nelso Jost committed
14
15
String read_BMP085_PRESSURE();

Nelso Jost's avatar
Nelso Jost committed
16
#include "libs/RTClib.h"
Nelso Jost's avatar
Nelso Jost committed
17
18
19
20
String read_RTC_DS1307();
String get_datetime_str(DateTime dt);
String set_time_from_csv(String s);

Nelso Jost's avatar
Nelso Jost committed
21
22
void mysensors_setup();

Nelso Jost's avatar
Nelso Jost committed
23
#define __SENSOR_COUNT            5
Nelso Jost's avatar
Nelso Jost committed
24

Nelso Jost's avatar
Nelso Jost committed
25
#define __SENSOR_NICKNAMES        {"l", "p", "t", "ah", "dt"}
Nelso Jost's avatar
Nelso Jost committed
26

Nelso Jost's avatar
Nelso Jost committed
27
#define __SENSOR_NAMES            {"LDR",                 \
Nelso Jost's avatar
Nelso Jost committed
28
29
30
31
32
                                   "BMP085_PRESSURE",     \
                                   "DHT22_TEMP",          \
                                   "DHT22_AH",            \
                                   "RTC_DS1307"}

33
#define __FP_READ_SENSOR          {&read_LDR,               \
Nelso Jost's avatar
Nelso Jost committed
34
35
36
37
                                   &read_BMP085_PRESSURE,   \
                                   &read_DHT22_TEMP,        \
                                   &read_DHT22_AH,          \
                                   &read_RTC_DS1307}
Nelso Jost's avatar
Nelso Jost committed
38
39

#endif