The core of it - minimalistic news based on technical facts

http://x700.blogspot.com/

Donnerstag, 13. September 2018

DHT11 Sensor no value Arduino

You try to access DHT11 Sensor from (Arduino) Wemos D1 mini without success?

Solution: Use "D4" instead of "4" for the Datapin!

#include
#include
#include
#include
#include
#include

#define DHTPIN D4                                    // what digital pin we're connected to
const char* ssid = "xxxxxxxx";
const char* password = "xxxxxx";               // Wireless Passcode

ESP8266WebServer server(80);

const int led = 5;

#define DHTTYPE DHT11                            // DHT 11
// define DHTTYPE DHT22                               // DHT 22  (AM2302), AM2321
//#define DHTTYPE DHT21   

.....   

Keine Kommentare: