Benutzer-Werkzeuge

Webseiten-Werkzeuge


esp8266_einstieg

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

esp8266_einstieg [17.05.2018]
esp8266_einstieg [30.11.2020] (aktuell)
Zeile 1: Zeile 1:
 +===== NodeMCU ESP8266 =====
  
 +\\
 +\\
 +==== Pinbelegung ====
 +
 +Die einzelnen Pins werden über ihre GPIO-Nummer angesprochen.\\
 +Hier die Zuordnung:
 +<code>
 +// Pinzuordnung am esp8266
 +// D0   = 16;
 +// D1   = 5;
 +// D2   = 4;
 +// D3   = 0;
 +// D4   = 2;
 +// D5   = 14;
 +// D6   = 12;
 +// D7   = 13;
 +// D8   = 15;
 +// D9   = 3;
 +// D10  = 1;
 +</code>
 +
 +\\
 +\\
 +==== Programmierung ====
 +
 +
 +Der NodeMCU ESP8266 wird wie ein Arduino mit der gleichen Software programmiert.\\
 +Wichtig ist die Installation der benötigten Treiber, die die Software aber mitbringt.\\
 +\\
 +[[doku.php?id=arduino_einstieg#treiberinstallation| weitere Infos]]\\
 +\\
 +
 +
 +
 +
 +\\
 +\\
 +\\
 +\\
 +==== Tastendruck ====
 +
 +
 +Der NodeMCU ESP8266 kann auf ein Ereignis wie einen Tastendruck reagieren.\\
 +\\
 +Als einfaches Beispiel wird der Taster zwischen Digitaleingang D1 und +3,3V Ausgang des NodeMCU angeschlossen. Zwischen Taster und 3V-Versorgung wird ein 10K-Widerstand angeschlossen, der dann auf Ground angeschlossen wird.\\
 +Schaltungsbeispiel:\\
 +{{::esp8266_taster.jpg?400|}}
 +
 +\\
 +Programmcode:\\
 +<code>
 +//
 +// Pinzuordnung am esp8266
 +// static const uint8_t D0   = 16;
 +// static const uint8_t D1   = 5;
 +// static const uint8_t D2   = 4;
 +// static const uint8_t D3   = 0;
 +// static const uint8_t D4   = 2;
 +// static const uint8_t D5   = 14;
 +// static const uint8_t D6   = 12;
 +// static const uint8_t D7   = 13;
 +// static const uint8_t D8   = 15;
 +// static const uint8_t D9   = 3;
 +// static const uint8_t D10  = 1;
 +
 +// Filename: esp8266_digi1_abfragen
 +
 +int ledPin = 16; //interne led
 +int tasterPin = 5; // digitaleingang d1
 +
 +int zaehler = 0;
 +
 +void setup(){
 +  pinMode(ledPin,OUTPUT);
 +  pinMode(tasterPin,INPUT);
 +  Serial.begin(9600);
 +}
 +
 +void loop(){
 +
 +
 +// IF Schleifen Beginn
 +  if (digitalRead(tasterPin)==LOW){
 +    digitalWrite(ledPin, HIGH);
 +    Serial.println("Eingang LOW");
 +  }
 +  else
 +  {
 +    digitalWrite(ledPin, LOW);
 +    Serial.println("Eingang HIGH");
 +    zaehler++;
 +  }
 +  Serial.print("Anzahl: ");
 +  Serial.println(zaehler);
 +  //delay(10000);  // wartezeit
 +
 +  // reset des zaehlers und ausgabe fue den benutzer
 +  //zaehler = 0;
 +  //Serial.print("Reset: ");
 +  //Serial.println(zaehler);
 +  
 +  // IF Schleifen Ende
 +  
 +delay(1000);  // wartezeit
 +
 +
 +} // void loop ende
 +</code>
 +
 +
 +
 +\\
 +Der SerialMonitor zeigt:\\
 +<code>
 +Eingang LOW
 +Anzahl: 0
 +Eingang LOW
 +Anzahl: 0
 +Eingang LOW
 +Anzahl: 0
 +Eingang LOW
 +Anzahl: 0
 +Eingang LOW
 +Anzahl: 0
 +Eingang HIGH
 +Anzahl: 1
 +Eingang HIGH
 +Anzahl: 2
 +Eingang HIGH
 +Anzahl: 3
 +Eingang HIGH
 +Anzahl: 4
 +Eingang HIGH
 +Anzahl: 5
 +Eingang HIGH
 +Anzahl: 6
 +Eingang HIGH
 +Anzahl: 7
 +Eingang HIGH
 +Anzahl: 8
 +Eingang HIGH
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +Anzahl: 9
 +Eingang LOW
 +</code>
 +
 +\\
 +\\
 +==== Kontakt zur Außenwelt ====
 +
 +==== Daten auf einen Webserver übertragen ====
 +
 +//esp8266_daten_per_wlan_an_raspi2_senden.ino//\\
 +<code>
 +////////////////////////////////
 +//  ESP8266 - Firmware 0.1
 +//  Post Values to Webserver
 +////////////////////////////////
 +//  Code by:
 +//  https://blog.silvertech.at
 +////////////////////////////////
 +
 +#include <ESP8266WiFi.h>
 +
 +const char* ssid = "hallonetz";
 +const char* password = "xyz";
 +const char* host = "192.168.178.28"; //Web Server
 +
 +// SensorID
 +  const char* SensorID = "ESPabcde";
 +  //Get One Wire Data
 +  const char* TmpWert = "123";
 +
 +
 +
 +void setup() {
 +  
 +  
 +  
 +  //Serial Start
 +  Serial.begin(9600);
 +  delay(10);
 +
 +  // We start by connecting to a WiFi network
 +
 +  Serial.println();
 +  Serial.println();
 +  Serial.print("Connecting to ");
 +  Serial.println(ssid);
 +  
 +  WiFi.begin(ssid, password);
 +  
 +  while (WiFi.status() != WL_CONNECTED) {
 +    delay(500);
 +    Serial.print(".");
 +  }
 +
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 +}
 +
 +
 +
 +void loop() {
 +  delay(15000);
 +
 +
 +  
 +  
 +  Serial.print("connecting to ");
 +  Serial.println(host);
 +  
 +  // Use WiFiClient class to create TCP connections
 +  WiFiClient client;
 +  const int httpPort = 80;
 +  if (!client.connect(host, httpPort)) {
 +    Serial.println("connection failed");
 +    return;
 +  }
 +  
 +  // We now create a URI for the request
 +  // esp8266.php?wert1=xa&wert2=yb
 +  String url = "/esp8266.php?";
 +  url += "wert1=";
 +  url += SensorID;
 +  url += "&wert2=";
 +  url += TmpWert;
 +  
 +  Serial.print("Requesting URL: ");
 +  Serial.println(url);
 +  
 +  // This will send the request to the server
 +  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
 +               "Host: " + host + "\r\n"
 +               "Connection: close\r\n\r\n");
 +  Serial.println("Werte an WebServer uebergeben");
 +  delay(10);
 +  
 +  // Read all the lines of the reply from server and print them to Serial
 +  while(client.available()){
 +    String line = client.readStringUntil('\r');
 +    //Serial.print(line);
 +  }
 +  
 +  Serial.println();
 +  Serial.println("closing connection");
 +}
 +</code>
 +
 +
 +
 +
 +\\
 +\\
 +==== Feinstaubsensor ====
 +
 +Infos folgen noch...\\
 +\\
 +
 +
 +
 +\\
 +\\
 +==== Abstand messen ====
 +
 +Am NodeMCU ESP8266 wird ein Ultraschallsensor HC-SR04 angeschlossen.\\
 +Trigger geht an D1 (GPIO5)\\
 +Echo geht an D2 (GPIO4)\\
 +VCC geht an VIN\\
 +GND geht an GND\\
 +\\
 +Der Programmcode esp8266_ultraschall_4.ino:\\
 +<code>
 +// 
 +// http://www.instructables.com/id/Distance-Measurement-Using-HC-SR04-Via-NodeMCU/
 +// http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-ultrasonic-sensor-%E0%B8%81%E0%B8%B1%E0%B8%9A-nodemcu-dev-kit-%E0%B8%81%E0%B8%B1%E0%B8%99/
 +
 +// esp8266_ultraschall_4.ino
 +
 +// defines pins numbers
 +#define TRIGGER_PIN  5
 +#define ECHO_PIN     4
 +
 +void setup() {
 +  Serial.begin (9600);
 +  pinMode(TRIGGER_PIN, OUTPUT);
 +  pinMode(ECHO_PIN, INPUT);
 +  pinMode(BUILTIN_LED, OUTPUT);
 +}
 +
 +void loop() {
 +  //long duration, distance;
 +  float duration, distance;
 +  digitalWrite(TRIGGER_PIN, LOW);  // Added this line
 +  delayMicroseconds(2); // Added this line
 +  digitalWrite(TRIGGER_PIN, HIGH);
 +  delayMicroseconds(10); // Added this line
 +  digitalWrite(TRIGGER_PIN, LOW);
 +  duration = pulseIn(ECHO_PIN, HIGH);
 +  distance = (duration/2) / 29.1;
 +  Serial.print(distance);
 +  Serial.println(" cm");
 +  delay(1000);
 +}
 +
 +</code>
 +\\
 +\\
 +Für eine Mittelwertbildung einer bestimmten Anzahl Messwerte kommt folgender Code zum Einsatz:\\
 +
 +<code>
 +// 
 +// http://www.instructables.com/id/Distance-Measurement-Using-HC-SR04-Via-NodeMCU/
 +// http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-ultrasonic-sensor-%E0%B8%81%E0%B8%B1%E0%B8%9A-nodemcu-dev-kit-%E0%B8%81%E0%B8%B1%E0%B8%99/
 +
 +// esp8266_ultraschall_5.ino
 +
 +// defines pins numbers
 +#define TRIGGER_PIN  5
 +#define ECHO_PIN     4
 +
 +float duration, distance;
 +float summeallermesswerte = 0;
 +int zaehler = 0;
 +float mittelwert = 0;
 +int durchlaeufe = 9;  // hier die gewünschte Anzahl eintragen
 +
 +
 +void setup() {
 +  Serial.begin (9600);
 +  pinMode(TRIGGER_PIN, OUTPUT);
 +  pinMode(ECHO_PIN, INPUT);
 +  pinMode(BUILTIN_LED, OUTPUT);
 +}
 +
 +void loop() {
 +
 +  for (int i=0; i<durchlaeufe; i++){ // for-schleifen-beginn
 +    
 +  // Ausgabe des aktuellen Durchlauf
 +  //Serial.print("I: ");
 +  //Serial.println(i);
 +  
 +  //long duration, distance;
 +  //float duration, distance;
 +  digitalWrite(TRIGGER_PIN, LOW);  // Added this line
 +  delayMicroseconds(2); // Added this line
 +  digitalWrite(TRIGGER_PIN, HIGH);
 +  delayMicroseconds(10); // Added this line
 +  digitalWrite(TRIGGER_PIN, LOW);
 +  duration = pulseIn(ECHO_PIN, HIGH);
 +  distance = (duration/2) / 29.1;
 +  Serial.print(distance);
 +  Serial.println(" cm");
 +
 +summeallermesswerte = summeallermesswerte + distance;
 +  //Serial.print("Summe: ");
 +  //Serial.print(summeallermesswerte);
 +  //Serial.println(" cm");
 +
 +  zaehler = zaehler + 1;
 +  //Serial.print("Zähler: ");
 +  //Serial.println(zaehler);
 +
 +  mittelwert = summeallermesswerte / zaehler;
 +  //Serial.print("Mittelwert: ");
 +  //Serial.print(mittelwert);
 +  //Serial.println("cm");
 +  
 +  delay(1000);
 +
 +  } // for-schleifen-ende
 +
 +  
 +// endausgabe
 +  // Ausgabe des Mittelwertes
 +  Serial.print("letzter Mittelwert: ");
 +  Serial.print(mittelwert);
 +  Serial.println(" cm");
 +
 +
 +
 +// Reset aller Ausgangswerte
 +  summeallermesswerte = 0;
 +  zaehler = 0;
 +  mittelwert = 0;
 +} // void-loop-ende
 +
 +</code>
 +\\
 +\\
 +Möchte man die Messwerte per WLAN auf einen Server übertragen, kommt folgendes Script zum Einsatz:\\
 +\\
 +esp8266_ultraschall_6.ino\\
 +<code>
 +// 
 +// http://www.instructables.com/id/Distance-Measurement-Using-HC-SR04-Via-NodeMCU/
 +// http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-ultrasonic-sensor-%E0%B8%81%E0%B8%B1%E0%B8%9A-nodemcu-dev-kit-%E0%B8%81%E0%B8%B1%E0%B8%99/
 +// https://blog.silvertech.at
 +//
 +// esp8266_ultraschall_6.ino
 +
 +#include <ESP8266WiFi.h>  // wlan einbinden
 +const char* ssid = "hallonetz"; // wlan ssid eintragen
 +const char* password = "xyz";  // wlan zugangspasswort eintragen
 +const char* host = "192.168.178.28"; //Web Server auf die Daten gespeichert werden
 +
 +// defines pins numbers
 +#define TRIGGER_PIN  5
 +#define ECHO_PIN     4
 +
 +const char* SensorID = "ESP8266_abstand";
 +float duration, distance;
 +float summeallermesswerte = 0;
 +int zaehler = 0;
 +float mittelwert = 0;
 +int durchlaeufe = 30;  // hier die gewünschte Anzahl eintragen
 +
 +
 +void setup() {
 +  Serial.begin (9600);
 +  pinMode(TRIGGER_PIN, OUTPUT);
 +  pinMode(ECHO_PIN, INPUT);
 +  pinMode(BUILTIN_LED, OUTPUT);
 +
 +
 +  
 +  // Kontakt zum wlan aufnehmen
 +  Serial.println();
 +  Serial.println();
 +  Serial.print("Connecting to ");
 +  Serial.println(ssid);
 +  
 +  WiFi.begin(ssid, password);
 +  
 +  while (WiFi.status() != WL_CONNECTED) {
 +    delay(500);
 +    Serial.print(".");
 +  }
 +
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 +
 +}  // void setup - ende
 +
 +
 +
 +void loop() {
 +
 +  for (int i=0; i<durchlaeufe; i++){ // for-schleifen-beginn
 +    
 +  // Ausgabe des aktuellen Durchlauf
 +  //Serial.print("I: ");
 +  //Serial.println(i);
 +  
 +  //long duration, distance;
 +  //float duration, distance;
 +  digitalWrite(TRIGGER_PIN, LOW);  // Added this line
 +  delayMicroseconds(2); // Added this line
 +  digitalWrite(TRIGGER_PIN, HIGH);
 +  delayMicroseconds(10); // Added this line
 +  digitalWrite(TRIGGER_PIN, LOW);
 +  duration = pulseIn(ECHO_PIN, HIGH);
 +  distance = (duration/2) / 29.1;
 +  Serial.print(distance);
 +  Serial.println(" cm");
 +
 +summeallermesswerte = summeallermesswerte + distance;
 +  //Serial.print("Summe: ");
 +  //Serial.print(summeallermesswerte);
 +  //Serial.println(" cm");
 +
 +  zaehler = zaehler + 1;
 +  //Serial.print("Zähler: ");
 +  //Serial.println(zaehler);
 +
 +  mittelwert = summeallermesswerte / zaehler;
 +  //Serial.print("Mittelwert: ");
 +  //Serial.print(mittelwert);
 +  //Serial.println("cm");
 +  
 +  delay(1000);
 +
 +  } // for-schleifen-ende
 +
 +  
 +// endausgabe
 +  // Ausgabe des Mittelwertes
 +  Serial.print("letzter Mittelwert: ");
 +  Serial.print(mittelwert);
 +  Serial.println(" cm");
 +
 +
 +// wlan datenübergabe - beginn
 +
 +Serial.print("Verbindungsaufbau ... ");
 +  Serial.println(host);
 +  
 +  // Use WiFiClient class to create TCP connections
 +  WiFiClient client;
 +  const int httpPort = 80;
 +  if (!client.connect(host, httpPort)) {
 +    Serial.println("connection failed");
 +    return;
 +  }
 +  
 +  // uri erstellent
 +  // esp8266.php?wert1=xa&wert2=yb
 +  String url = "/abstand.php?";
 +  url += "wert1=";
 +  url += SensorID;
 +  url += "&wert2=";
 +  url += mittelwert;
 +  
 +  Serial.print("Requesting URL: ");
 +  Serial.println(url);
 +  
 +  // senden
 +  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
 +               "Host: " + host + "\r\n"
 +               "Connection: close\r\n\r\n");
 +  Serial.println("Werte an WebServer uebergeben");
 +  delay(10);
 +  
 +  // Read all the lines of the reply from server and print them to Serial
 +  while(client.available()){
 +    String line = client.readStringUntil('\r');
 +    //Serial.print(line);
 +  }
 +  
 +  Serial.println();
 +  Serial.println("Verbindung wird beendet ...");
 +
 +// wlan datenübergabe - ende
 +
 +
 +
 +// Reset aller Ausgangswerte
 +  summeallermesswerte = 0;
 +  zaehler = 0;
 +  mittelwert = 0;
 +  
 +} // void-loop-ende
 +
 +</code>
 +
 +
 +
 +
 +
 +\\
 +\\
 +==== Temperatur messen ====
 +
 +Mit einem DS18B20-Temperatursensor kann ganz einfach die Temperatur gemessen werden.\\
 +Dazu wird am Sensor der Eingang Vin (3,3Volt) und der Datenpin (Mitte) mit einem 1K-Widerstand verbunden.\\
 +\\
 +Vin des Sensors wird an 3,3Volt-Pin des NodeMCU Boards angeschlossen.\\
 +Data des Sensors wird an D4 (Digitaleingang) des NodeMCU-Boards angeschlossen.\\
 +Ground des Sensors wird mit Ground des NodeMCU-Board verbunden.\\
 +
 +{{::ds18b20_widerstand.jpg?200|}}
 +{{::ds18b22_1k_verloetet.jpg?400|}}
 +
 +
 +\\
 +Folgender Code liest die Temperatur aus und zeigt am SerialMonitor an:
 +
 +<code>
 +// Quelle:
 +// ESP8266 DS18B20 ArduinoIDE Thingspeak IoT Example code
 +// http://vaasa.hacklab.fi
 +// https://vaasa.hacklab.fi/2016/02/06/esp8266-on-nodemcu-board-ds18b20-arduinoide-thingspeak/
 +// https://github.com/milesburton/Arduino-Temperature-Control-Library
 +// https://gist.github.com/jeje/57091acf138a92c4176a
 +
 +
 +// esp8288_ds18b20_1.ino
 +
 +#include <OneWire.h>
 +#include <DallasTemperature.h>
 +#define ONE_WIRE_BUS D4 // Digitaleingang D4
 +
 +OneWire oneWire(ONE_WIRE_BUS);
 +DallasTemperature DS18B20(&oneWire);
 +
 +char temperatureString[6];
 +
 +void setup(void){
 +  Serial.begin(9600);
 +  Serial.println("");
 +  DS18B20.begin();
 +}
 +
 +float getTemperature() {
 +  float temp;
 +  do {
 +    DS18B20.requestTemperatures(); 
 +    temp = DS18B20.getTempCByIndex(0);
 +    delay(100);
 +  } while (temp == 85.0 || temp == (-127.0));
 +  return temp;
 +}
 +
 +
 +void loop() {
 +  float temperature = getTemperature();
 +
 +  dtostrf(temperature, 2, 2, temperatureString);
 +  Serial.println(temperatureString);
 +  delay(1000);
 +}
 +</code>
 +
 +\\
 +\\
 +Möchte man nun Abstand und Temperatur erfassen, wird dieses Script benötigt:
 +<code>
 +// 
 +// http://www.instructables.com/id/Distance-Measurement-Using-HC-SR04-Via-NodeMCU/
 +// http://thaiopensource.org/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%A5%E0%B9%88%E0%B8%99-ultrasonic-sensor-%E0%B8%81%E0%B8%B1%E0%B8%9A-nodemcu-dev-kit-%E0%B8%81%E0%B8%B1%E0%B8%99/
 +// https://blog.silvertech.at
 +//
 +// esp8266_abstand_temperatur.ino
 +
 +#include <ESP8266WiFi.h>  // wlan einbinden
 +#include <OneWire.h>
 +#include <DallasTemperature.h>
 +#include <ESP8266WiFi.h>  // wlan einbinden
 +const char* ssid = "xyz"; // wlan ssid eintragen
 +const char* password = "123";  // wlan zugangspasswort eintragen
 +const char* host = "192.168.178.28"; //Web Server auf die Daten gespeichert werden
 +
 +// defines pins numbers
 +#define TRIGGER_PIN  5
 +#define ECHO_PIN     4
 +#define ONE_WIRE_BUS D4 // Digitaleingang D4
 +
 +OneWire oneWire(ONE_WIRE_BUS);
 +DallasTemperature DS18B20(&oneWire);
 +char temperatureString[6];
 +
 +const char* SensorID = "ESP8266_abstand";
 +float duration, distance;
 +float summeallermesswerte = 0;
 +int zaehler = 0;
 +float mittelwert = 0;
 +int durchlaeufe = 30;  // hier die gewünschte Anzahl eintragen
 +
 +
 +void setup() {
 +  Serial.begin (9600);
 +  pinMode(TRIGGER_PIN, OUTPUT);
 +  pinMode(ECHO_PIN, INPUT);
 +  pinMode(BUILTIN_LED, OUTPUT);
 +
 +  DS18B20.begin();
 +  
 +  // Kontakt zum wlan aufnehmen
 +  Serial.println();
 +  Serial.println();
 +  Serial.print("Connecting to ");
 +  Serial.println(ssid);
 +  
 +  WiFi.begin(ssid, password);
 +  
 +  while (WiFi.status() != WL_CONNECTED) {
 +    delay(500);
 +    Serial.print(".");
 +  }
 +
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 +
 +}  // void setup - ende
 +
 +
 +
 +
 +float getTemperature() {
 +  float temp;
 +  do {
 +    DS18B20.requestTemperatures(); 
 +    temp = DS18B20.getTempCByIndex(0);
 +    delay(100);
 +  } while (temp == 85.0 || temp == (-127.0));
 +  return temp;
 +}
 +
 +
 +
 +
 +void loop() {
 +
 +  for (int i=0; i<durchlaeufe; i++){ // for-schleifen-beginn
 +    
 +  // Ausgabe des aktuellen Durchlauf
 +  //Serial.print("I: ");
 +  //Serial.println(i);
 +  
 +  //long duration, distance;
 +  //float duration, distance;
 +  digitalWrite(TRIGGER_PIN, LOW);  // Added this line
 +  delayMicroseconds(2); // Added this line
 +  digitalWrite(TRIGGER_PIN, HIGH);
 +  delayMicroseconds(10); // Added this line
 +  digitalWrite(TRIGGER_PIN, LOW);
 +  duration = pulseIn(ECHO_PIN, HIGH);
 +  distance = (duration/2) / 29.1;
 +  Serial.print(distance);
 +  Serial.println(" cm");
 +
 +summeallermesswerte = summeallermesswerte + distance;
 +  //Serial.print("Summe: ");
 +  //Serial.print(summeallermesswerte);
 +  //Serial.println(" cm");
 +
 +  zaehler = zaehler + 1;
 +  //Serial.print("Zähler: ");
 +  //Serial.println(zaehler);
 +
 +  mittelwert = summeallermesswerte / zaehler;
 +  //Serial.print("Mittelwert: ");
 +  //Serial.print(mittelwert);
 +  //Serial.println("cm");
 +  
 +  delay(1000);
 +
 +  } // for-schleifen-ende
 +
 +
 +
 +  // Temperaturmessung
 +  float temperature = getTemperature();
 +  dtostrf(temperature, 2, 2, temperatureString);
 +  Serial.println(temperatureString);
 +
 +
 +  
 +  
 +// endausgabe
 +  // Ausgabe des Mittelwertes
 +  Serial.print("letzter Mittelwert: ");
 +  Serial.print(mittelwert);
 +  Serial.println(" cm");
 +
 +
 +// wlan datenübergabe - beginn
 +
 +Serial.print("Verbindungsaufbau ... ");
 +  Serial.println(host);
 +  
 +  // Use WiFiClient class to create TCP connections
 +  WiFiClient client;
 +  const int httpPort = 80;
 +  if (!client.connect(host, httpPort)) {
 +    Serial.println("connection failed");
 +    return;
 +  }
 +  
 +  // uri erstellen
 +  // esp8266.php?wert1=xa&wert2=yb
 +  String url = "/abstandswerteintragen.php?";
 +  url += "wert1=";
 +  url += mittelwert;
 +  url += "&wert2=";
 +  url += temperatureString;
 +  
 +  Serial.print("Requesting URL: ");
 +  Serial.println(url);
 +  
 +  // senden
 +  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
 +               "Host: " + host + "\r\n"
 +               "Connection: close\r\n\r\n");
 +  Serial.println("Werte an WebServer uebergeben");
 +  delay(10);
 +  
 +  // Read all the lines of the reply from server and print them to Serial
 +  while(client.available()){
 +    String line = client.readStringUntil('\r');
 +    //Serial.print(line);
 +  }
 +  
 +  Serial.println();
 +  Serial.println("Verbindung wird beendet ...");
 +
 +// wlan datenübergabe - ende
 +
 +
 +
 +// Reset aller Ausgangswerte
 +  summeallermesswerte = 0;
 +  zaehler = 0;
 +  mittelwert = 0;
 +  
 +} // void-loop-ende
 +</code>
 +
 +
 +==== UV-Senosr ML8511 ====
 +
 +
 +NodeESP8266 PIN - Modul Pin\\
 +\\
 +3,3 Volt - 3,3 Volt\\
 +GND - GND\\
 +A0 - OUT\\
 +\\
 +\\
 +Code mit wlan:\\
 +<code>
 +//
 +// UV-Sensor ML8511
 +//
 +// mit wlan-anbindung
 +//
 +// esp8266:
 +// http://www.esp8266learning.com/wemos-ml8511-example.php
 +// Arduino:
 +// https://www.14core.com/wiring-the-ml8511-ultra-violet-light-sensor-on-microcontroller/
 +// http://www.electronics-lab.com/project/arduino-uv-meter-using-uv30a-ultraviolet-sensor/
 +//
 +// UV-Index-Infos:
 +// http://www.bfs.de/DE/themen/opt/uv/uv-index/einfuehrung/einfuehrung.html;jsessionid=A48D2406906E70E8BE26B42256A2E375.1_cid382
 +//
 +// UV Index - Belastung - Maßnahme
 +// 1 - 2    niedrig   keine Schutzmaßnahmen erforderlich.
 +//
 +// 3 - 5    mittel    Schutz erforderlich:
 +//                     während der Mittagsstunden Schatten aufsuchen
 +//                     entsprechende Kleidung, Hut und Sonnenbrille tragen
 +//                     für unbedeckte Haut Sonnenschutzmittel mit ausreichendem Lichtschutzfaktor verwenden.
 +// 
 +// 6 - 7    hoch     Schutz erforderlich:
 +//                      während der Mittagsstunden Schatten aufsuchen
 +//                      entsprechende Kleidung, Hut und Sonnenbrille tragen
 +//                      für unbedeckte Haut Sonnenschutzmittel mit ausreichendem Lichtschutzfaktor verwenden.
 +// 
 +// 8 - 10   sehr hoch Schutz absolut notwendig:
 +//                      In der Mittagszeit möglichst nicht draußen aufhalten!
 +//                      Unbedingt Schatten aufsuchen!
 +//                      Entsprechende Kleidung, Hut, Sonnenbrille und Sonnencreme mit ausreichendem Lichtschutzfaktor sind dringend nötig. 
 +// 
 +// 11 und höher  extrem 
 +//
 +//
 +
 +
 +#include <ESP8266WiFi.h>  // wlan einbinden
 +const char* ssid = "ssd deines wlans"; // wlan ssid eintragen
 +const char* password = "StrengGeheimPw";  // wlan zugangspasswort eintragen
 +const char* host = "192.168.178.28"; //Web Server auf die Daten gespeichert werden
 +const char* melder = "ESP8266_uvindex";
 +const char* SensorID = "ESP8266_uvindex";
 +float duration, distance;
 +float summeallermesswerte = 0;
 +int zaehler = 0;
 +float mittelwert = 0;
 +int durchlaeufe = 30;  // hier die gewünschte Anzahl eintragen
 +
 +
 +int UVsensorIn = A0; //Output from the sensor
 + 
 +void setup()
 +{
 +  pinMode(UVsensorIn, INPUT);
 +  Serial.begin(9600); //open serial port, set the baud rate to 9600 bps
 +
 +  // Kontakt zum wlan aufnehmen
 +  Serial.println();
 +  Serial.println();
 +  Serial.print("Connecting to ");
 +  Serial.println(ssid);
 +  
 +  WiFi.begin(ssid, password);
 +  
 +  while (WiFi.status() != WL_CONNECTED) {
 +    delay(500);
 +    Serial.print(".");
 +  }
 +
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 +
 +}
 + 
 +void loop()
 +{
 +  String UVIndex = "0";
 +  int voltage = averageAnalogRead(UVsensorIn);
 +  //int uvLevel = averageAnalogRead(UVsensorIn);
 + 
 +  //float outputVoltage = 3.3 * uvLevel/1024;
 +    float outputVoltage = 3.3 * voltage/1024;
 +  float uvIntensity = mapfloat(outputVoltage, 0.99, 2.9, 0.0, 15.0);
 + 
 +  Serial.print(" Analoger Wert: ");
 +  Serial.print(voltage);
 +    Serial.print(" mV");
 +  Serial.println(); //Zeilenumbruch
 +  
 +  //Serial.print(" Analogsignal: ");
 +  //Serial.print(uvLevel);
 +  //Serial.println(); //Zeilenumbruch
 +  
 +  Serial.print(" UV Intensity: ");
 +  Serial.print(uvIntensity);
 +  Serial.print(" mW/cm^2"); 
 +  Serial.println(); //Zeilenumbruch 
 +
 +
 +
 +if(voltage<50)
 +  {
 +    Serial.print(" UVIndex: 0");
 +    //UVIndex = "0";
 +  }else if (voltage>50 && voltage<=227)
 +  {
 +    Serial.print(" UVIndex: 0");//UVIndex = "0";
 +  }else if (voltage>227 && voltage<=318)
 +  {
 +    Serial.print(" UVIndex: 1");//UVIndex = "1";
 +  }
 +  else if (voltage>318 && voltage<=408)
 +  {
 +    Serial.print(" UVIndex: 2");//UVIndex = "2";
 +  }else if (voltage>408 && voltage<=503)
 +  {
 +    Serial.print(" UVIndex: 3");//UVIndex = "3";
 +  }
 +  else if (voltage>503 && voltage<=606)
 +  {
 +    Serial.print(" UVIndex: 4");//UVIndex = "4";
 +  }else if (voltage>606 && voltage<=696)
 +  {
 +    Serial.print(" UVIndex: 5");//UVIndex = "5";
 +  }else if (voltage>696 && voltage<=795)
 +  {
 +    Serial.print(" UVIndex: 6");//UVIndex = "6";
 +  }else if (voltage>795 && voltage<=881)
 +  {
 +    Serial.print(" UVIndex: 7");//UVIndex = "7";
 +  }
 +  else if (voltage>881 && voltage<=976)
 +  {
 +    Serial.print(" UVIndex: 8");//UVIndex = "8";
 +  }
 +  else if (voltage>976 && voltage<=1079)
 +  {
 +    Serial.print("UVIndex: 9");//UVIndex = "9";
 +  }
 +  else if (voltage>1079 && voltage<=1170)
 +  {
 +    Serial.print(" UVIndex: 10");//UVIndex = "10";
 +  }else if (voltage>1170)
 +  {
 +    Serial.print("UVIndex: 11");//UVIndex = "11";
 +  }
 +
 +  Serial.println(); //Zeilenumbruch
 +  Serial.println(); //Zeilenumbruch
 +  delay(10000);
 +
 +
 +
 +// wlan datenübergabe - beginn
 +
 +Serial.print("Verbindungsaufbau ... ");
 +  Serial.println(host);
 +  
 +  // Use WiFiClient class to create TCP connections
 +  WiFiClient client;
 +  const int httpPort = 80;
 +  if (!client.connect(host, httpPort)) {
 +    Serial.println("connection failed");
 +    return;
 +  }
 +  
 +  // uri erstellen
 +  // esp8266.php?wert1=xa&wert2=yb
 +  String url = "/uvindexwerteintragen.php?";
 +  //url += "melder=";
 +  //url += melder;
 +  url += "wert1=";
 +  url += voltage;
 +  url += "&wert2=";
 +  url += uvIntensity;
 +  
 +  Serial.print("Requesting URL: ");
 +  Serial.println(url);
 +  
 +  // senden
 +  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
 +               "Host: " + host + "\r\n"
 +               "Connection: close\r\n\r\n");
 +  Serial.println("Werte an WebServer uebergeben");
 +  delay(10);
 +  
 +  // Read all the lines of the reply from server and print them to Serial
 +  while(client.available()){
 +    String line = client.readStringUntil('\r');
 +    //Serial.print(line);
 +  }
 +  
 +  Serial.println();
 +  Serial.println("Verbindung wird beendet ...");
 +
 +// wlan datenübergabe - ende
 +
 +
 +
 +}  // void-loop ende
 + 
 +//Takes an average of readings on a given pin
 +//Returns the average
 +int averageAnalogRead(int pinToRead)
 +{
 +  byte numberOfReadings = 8;
 +  unsigned int runningValue = 0; 
 + 
 +  for(int x = 0 ; x < numberOfReadings ; x++)
 +    runningValue += analogRead(pinToRead);
 +  runningValue /= numberOfReadings;
 + 
 +  return(runningValue);  
 + 
 +}
 + 
 + 
 +float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
 +{
 +  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
 +}
 +
 +</code>
 +\\
 +\\
 +
 +Code mit mqtt:\\
 +<code>
 +//
 +// UV-Sensor ML8511
 +//
 +// mit wlan-anbindung
 +//
 +// esp8266:
 +// http://www.esp8266learning.com/wemos-ml8511-example.php
 +// Arduino:
 +// https://www.14core.com/wiring-the-ml8511-ultra-violet-light-sensor-on-microcontroller/
 +// http://www.electronics-lab.com/project/arduino-uv-meter-using-uv30a-ultraviolet-sensor/
 +//
 +// UV-Index-Infos:
 +// http://www.bfs.de/DE/themen/opt/uv/uv-index/einfuehrung/einfuehrung.html;jsessionid=A48D2406906E70E8BE26B42256A2E375.1_cid382
 +//
 +// UV Index - Belastung - Maßnahme
 +// 1 - 2    niedrig   keine Schutzmaßnahmen erforderlich.
 +//
 +// 3 - 5    mittel    Schutz erforderlich:
 +//                     während der Mittagsstunden Schatten aufsuchen
 +//                     entsprechende Kleidung, Hut und Sonnenbrille tragen
 +//                     für unbedeckte Haut Sonnenschutzmittel mit ausreichendem Lichtschutzfaktor verwenden.
 +// 
 +// 6 - 7    hoch     Schutz erforderlich:
 +//                      während der Mittagsstunden Schatten aufsuchen
 +//                      entsprechende Kleidung, Hut und Sonnenbrille tragen
 +//                      für unbedeckte Haut Sonnenschutzmittel mit ausreichendem Lichtschutzfaktor verwenden.
 +// 
 +// 8 - 10   sehr hoch Schutz absolut notwendig:
 +//                      In der Mittagszeit möglichst nicht draußen aufhalten!
 +//                      Unbedingt Schatten aufsuchen!
 +//                      Entsprechende Kleidung, Hut, Sonnenbrille und Sonnencreme mit ausreichendem Lichtschutzfaktor sind dringend nötig. 
 +// 
 +// 11 und höher  extrem 
 +//
 +//
 +
 +
 +#include <ESP8266WiFi.h>  // wlan einbinden
 +#include <PubSubClient.h> // mqtt
 +const char* ssid = "ssd deines wlans"; // wlan ssid eintragen
 +const char* password = "strengGeheimPW";  // wlan zugangspasswort eintragen
 +const char* host = "192.168.178.28"; //Web Server auf die Daten gespeichert werden
 +const char* melder = "ESP8266_uvindex";
 +const char* SensorID = "ESP8266_uvindex";
 +float duration, distance;
 +float summeallermesswerte = 0;
 +int zaehler = 0;
 +float mittelwert = 0;
 +int durchlaeufe = 30;  // hier die gewünschte Anzahl eintragen
 +
 +//mqtt
 +const char* mqttServer = "192.168.178.30";
 +const int mqttPort = 1883;
 +const char* mqttUser = "bnnane";
 +const char* mqttPassword = "passwortgeheim";
 +WiFiClient espClient;
 +PubSubClient client(espClient);
 +
 +
 +
 +int UVsensorIn = A0; //Output from the sensor
 + 
 +void setup()
 +{
 +  pinMode(UVsensorIn, INPUT);
 +  Serial.begin(9600); //open serial port, set the baud rate to 9600 bps
 +
 +  // Kontakt zum wlan aufnehmen
 +  Serial.println();
 +  Serial.println();
 +  Serial.print("Connecting to ");
 +  Serial.println(ssid);
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 +  
 +
 +//mqtt
 +  //client.setServer(mqttServer, mqttPort);
 +  //client.setCallback(callback);
 +  
 +  WiFi.begin(ssid, password);
 +  
 +  while (WiFi.status() != WL_CONNECTED) {
 +    delay(500);
 +    Serial.print(".");
 +  }
 +
 + /*
 +  Serial.println("");
 +  Serial.println("WiFi connected");  
 +  Serial.println("IP address: ");
 +  Serial.println(WiFi.localIP());
 + */
 +
 + client.setServer(mqttServer, mqttPort);
 +  //client.setCallback(callback);
 + 
 +  while (!client.connected()) {
 +    Serial.println("Connecting to MQTT...");
 + 
 +    //if (client.connect("ESP8266Client", mqttUser, mqttPassword )) {
 +    if (client.connect("ESP8266Client" )) {
 + 
 +      Serial.println("connected");  
 + 
 +    } else {
 + 
 +      Serial.print("failed with state ");
 +      Serial.print(client.state());
 +      delay(2000);
 + 
 +    }
 +  }
 +  
 +  client.publish("datenempfang", " - MQTT-Verbindung hergestellt - "); //Topic name
 +  client.subscribe("datenempfang");
 +    
 +}
 +
 +void callback(char* topic, byte* payload, unsigned int length) {
 + 
 +  Serial.print("Message arrived in topic: ");
 +  Serial.println(topic);
 + 
 +  Serial.print("Message:");
 +  for (int i = 0; i < length; i++) {
 +    Serial.print((char)payload[i]);
 +  }
 + 
 +  Serial.println();
 +  Serial.println("-----------------------");
 + 
 +}
 +
 +
 + 
 +void loop()
 +{
 +  String UVIndex = "0";
 +  int voltage = averageAnalogRead(UVsensorIn);
 +  //int uvLevel = averageAnalogRead(UVsensorIn);
 + 
 +  //float outputVoltage = 3.3 * uvLevel/1024;
 +    float outputVoltage = 3.3 * voltage/1024;
 +  float uvIntensity = mapfloat(outputVoltage, 0.99, 2.9, 0.0, 15.0);
 + 
 +  Serial.print(" Analoger Wert: ");
 +  Serial.print(voltage);
 +    Serial.print(" mV");
 +  Serial.println(); //Zeilenumbruch
 +  
 +  //Serial.print(" Analogsignal: ");
 +  //Serial.print(uvLevel);
 +  //Serial.println(); //Zeilenumbruch
 +  
 +  Serial.print(" UV Intensity: ");
 +  Serial.print(uvIntensity);
 +  Serial.print(" mW/cm^2"); 
 +  Serial.println(); //Zeilenumbruch 
 +
 +
 +
 +
 +
 +if(voltage<50)
 +  {
 +    Serial.print(" UVIndex: 0");
 +      //mqtt
 +      client.publish("datenempfang", "0"); //Topic name
 +      client.subscribe("datenempfang");
 +    //UVIndex = "0";
 +  }
 +  else if (voltage>50 && voltage<=227)
 +  {
 +    Serial.print(" UVIndex: 0");//UVIndex = "0";
 +      //mqtt
 +      client.publish("datenempfang", "0"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>227 && voltage<=318)
 +  {
 +    Serial.print(" UVIndex: 1");//UVIndex = "1";
 +      //mqtt
 +      client.publish("datenempfang", "1"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>318 && voltage<=408)
 +  {
 +    Serial.print(" UVIndex: 2");//UVIndex = "2";
 +      //mqtt
 +      client.publish("datenempfang", "2"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>408 && voltage<=503)
 +  {
 +    Serial.print(" UVIndex: 3");//UVIndex = "3";
 +      //mqtt
 +      client.publish("datenempfang", "3"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>503 && voltage<=606)
 +  {
 +    Serial.print(" UVIndex: 4");//UVIndex = "4";
 +      //mqtt
 +      client.publish("datenempfang", "4"); //Topic name
 +      client.subscribe("datenempfang");
 +  }else if (voltage>606 && voltage<=696)
 +  {
 +    Serial.print(" UVIndex: 5");//UVIndex = "5";
 +      //mqtt
 +      client.publish("datenempfang", "5"); //Topic name
 +      client.subscribe("datenempfang");
 +  }else if (voltage>696 && voltage<=795)
 +  {
 +    Serial.print(" UVIndex: 6");//UVIndex = "6";
 +      //mqtt
 +      client.publish("datenempfang", "6"); //Topic name
 +      client.subscribe("datenempfang");
 +  }else if (voltage>795 && voltage<=881)
 +  {
 +    Serial.print(" UVIndex: 7");//UVIndex = "7";
 +      //mqtt
 +      client.publish("datenempfang", "7"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>881 && voltage<=976)
 +  {
 +    Serial.print(" UVIndex: 8");//UVIndex = "8";
 +      //mqtt
 +      client.publish("datenempfang", "8"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>976 && voltage<=1079)
 +  {
 +    Serial.print("UVIndex: 9");//UVIndex = "9";
 +      //mqtt
 +      client.publish("datenempfang", "9"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +  else if (voltage>1079 && voltage<=1170)
 +  {
 +    Serial.print(" UVIndex: 10");//UVIndex = "10";
 +      //mqtt
 +      client.publish("datenempfang", "10"); //Topic name
 +      client.subscribe("datenempfang");
 +  }else if (voltage>1170)
 +  {
 +    Serial.print("UVIndex: 11");//UVIndex = "11";
 +      //mqtt
 +      client.publish("datenempfang", "11"); //Topic name
 +      client.subscribe("datenempfang");
 +  }
 +
 +  Serial.println(); //Zeilenumbruch
 +  Serial.println(); //Zeilenumbruch
 +  delay(10000);
 +
 +
 +
 +// wlan datenübergabe - beginn
 +
 +Serial.print("Verbindungsaufbau ... ");
 +  Serial.println(host);
 +  
 +  // Use WiFiClient class to create TCP connections
 +  WiFiClient client;
 +  const int httpPort = 80;
 +  if (!client.connect(host, httpPort)) {
 +    Serial.println("connection failed");
 +    return;
 +  }
 +  
 +  // uri erstellen
 +  // esp8266.php?wert1=xa&wert2=yb
 +  String url = "/uvindexwerteintragen.php?";
 +  //url += "melder=";
 +  //url += melder;
 +  url += "wert1=";
 +  url += voltage;
 +  url += "&wert2=";
 +  url += uvIntensity;
 +  
 +  Serial.print("Requesting URL: ");
 +  Serial.println(url);
 +  
 +  // senden
 +  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
 +               "Host: " + host + "\r\n"
 +               "Connection: close\r\n\r\n");
 +  Serial.println("Werte an WebServer uebergeben");
 +  delay(10);
 +  
 +  // Read all the lines of the reply from server and print them to Serial
 +  while(client.available()){
 +    String line = client.readStringUntil('\r');
 +    //Serial.print(line);
 +  }
 +  
 +  Serial.println();
 +  Serial.println("Verbindung wird beendet ...");
 +
 +// wlan datenübergabe - ende
 +
 +
 +
 +}  // void-loop ende
 + 
 +//Takes an average of readings on a given pin
 +//Returns the average
 +int averageAnalogRead(int pinToRead)
 +{
 +  byte numberOfReadings = 8;
 +  unsigned int runningValue = 0; 
 + 
 +  for(int x = 0 ; x < numberOfReadings ; x++)
 +    runningValue += analogRead(pinToRead);
 +  runningValue /= numberOfReadings;
 + 
 +  return(runningValue);  
 + 
 +}
 + 
 + 
 +float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
 +{
 +  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
 +}
 +
 +</code>
 +
 +
 +
 +
 +
 +
 +\\
 +\\
 +=== Quellen ===
 +
 +\\
 +1) [[https://www.google.de/search?client=firefox-b&dcr=0&biw=1892&bih=935&tbm=isch&sa=1&ei=dTzQWpPZG6TgkgXU0JWQBw&q=pinbelegung+nodemcu+esp8266&oq=pinbelegung+nodemcu+esp8266&gs_l=psy-ab.3...911218.923274.0.923906.29.28.1.0.0.0.160.2154.26j1.27.0....0...1c.1.64.psy-ab..1.5.404...0i8i13i30k1j0i13k1j0i8i30k1j0i24k1.0.fKew21N189E#imgrc=8EwK33hzjrkNWM:|NodeMCU Pinbelegung]]
 +
 +2) [[https://www.google.de/imgres?imgurl=https%3A%2F%2Flh3.googleusercontent.com%2F-MmsotOmO16A%2FVh0LJzB7EuI%2FAAAAAAAAVvg%2FQNYXqqDuqL8%2Fs640-Ic42%2Fesp-sr04.png&imgrefurl=http%3A%2F%2Fthaiopensource.org%2F%25E0%25B8%25A1%25E0%25B8%25B2%25E0%25B9%2580%25E0%25B8%25A5%25E0%25B9%2588%25E0%25B8%2599-ultrasonic-sensor-%25E0%25B8%2581%25E0%25B8%25B1%25E0%25B8%259A-nodemcu-dev-kit-%25E0%25B8%2581%25E0%25B8%25B1%25E0%25B8%2599%2F&docid=BbLc1eXzKT4UqM&tbnid=fkyq_peuw0SBWM%3A&vet=10ahUKEwjT55z0vrbaAhUksKQKHVRoBXIQMwhHKA0wDQ..i&w=640&h=501&client=firefox-b&bih=935&biw=1892&q=hc-sr04%20nodemcu&ved=0ahUKEwjT55z0vrbaAhUksKQKHVRoBXIQMwhHKA0wDQ&iact=mrc&uact=8|Verdrahtung]]
 +
 +3) [[https://vaasa.hacklab.fi/2016/02/06/esp8266-on-nodemcu-board-ds18b20-arduinoide-thingspeak/|Temperaturmessung]]
 +\\