ESPNode
sensor_18B20.h
Go to the documentation of this file.
1 
2 #ifdef USE_SENSOR_18B20
3 #ifndef _SENSOR_18B20_H_
4 #define _SENSOR_18B20_H_
5 
6 #include <OneWire.h>
7 #include <DallasTemperature.h>
8 #include "base_generic.h"
9 
15 class Sensor_18B20 : public Base_Generic {
16 
17 public:
25  void begin(const char* _html_place, const char* _label, const char* _mqtt_name);
26 
31  void loop(time_t now);
32 
39  void html_init();
40 
41 private:
46  void start_measure(time_t now);
47 
51  bool measure_started = false;
52 
56  time_t measure_starttime = 0;
57 
61  DeviceAddress myThermometer;
62 
66  String tempC = String("---");
67 
68 };
69 
70 #endif
71 #endif
Ein generisches Objekt für einen Sensor/Actor. Achtung: Nicht zum Einbau bestimmt,...
Definition: base_generic.h:12
void loop(time_t now)
Eine Funktion die im Hauptprogramm im loop regelmäßig aufgerufen wird. Hier als leere Funktion implem...
Definition: base_generic.cpp:30
void html_init()
Initialisierung einer Webseite Wenn sich ein Browser verbindet und die Webseite des Nodes aufruft,...
Definition: base_generic.cpp:50
void begin(const char *_html_place, const char *_label)
Legt die Startkonfiguration des Sensors fest. Die übergebenen Variabelen werden in die entsprechenden...
Definition: base_generic.cpp:9
time_t now
Eine Variable für Zeitinformationen.
Definition: main.h:115