ampel-firmware.h 1.01 KB
Newer Older
1
2
3
4
5
#ifndef AMPEL_H_INCLUDED
#define AMPEL_H_INCLUDED
/*****************************************************************
 * Libraries                                                     *
 *****************************************************************/
Eric Duminil's avatar
Notes    
Eric Duminil committed
6
//TODO: check header dependencies, and simplify if possible.
7
8
9
10
#include "config.h"
#ifndef MEASUREMENT_TIMESTEP
#  error Missing config.h file. Please copy config.example.h to config.h.
#endif
11

Eric Duminil's avatar
Eric Duminil committed
12
#ifdef AMPEL_CSV
13
14
#  include "csv_writer.h"
#endif
Eric Duminil's avatar
Eric Duminil committed
15
16
17
18
19
20
21
22
23

#ifdef AMPEL_WIFI
#  include "wifi_util.h"
#  ifdef AMPEL_MQTT
#    include "mqtt.h"
#  endif
#  ifdef AMPEL_HTTP
#    include "web_server.h"
#  endif
24
#endif
Eric Duminil's avatar
Eric Duminil committed
25

Eric Duminil's avatar
Eric Duminil committed
26
#ifdef AMPEL_LORAWAN
Eric Duminil's avatar
Eric Duminil committed
27
28
#  include "lorawan.h"
#endif
29
30
31
32
33
34
35

#include "util.h"
#include "co2_sensor.h"

#include "led_effects.h"

#if defined(ESP8266)
36
//allows sensor to be seen as SENSOR_ID.local, from the local network. For example : espd03cc5.local
37
38
39
40
41
42
43
44
45
#  include <ESP8266mDNS.h>
#elif defined(ESP32)
#  include <ESPmDNS.h>
#endif

void keepServicesAlive();
void checkFlashButton();

#endif