mysensors.h 1.03 KB
Newer Older
1

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

9
#include "DHT.h"
10 11 12
String read_DHT22_TEMP();
String read_DHT22_AH();

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

16
#include "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);

21 22
void mysensors_setup();

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

25
#define __SENSOR_NICKNAMES        {"l", "p", "t", "ah", "dt"}
26

27
#define __SENSOR_NAMES            {"LDR",                 \
28 29 30 31 32
                                   "BMP085_PRESSURE",     \
                                   "DHT22_TEMP",          \
                                   "DHT22_AH",            \
                                   "RTC_DS1307"}

33
#define __FP_READ_SENSOR          {&read_LDR,               \
34 35 36 37
                                   &read_BMP085_PRESSURE,   \
                                   &read_DHT22_TEMP,        \
                                   &read_DHT22_AH,          \
                                   &read_RTC_DS1307}
38 39

#endif