user43421: Its my first time make arduino project. I make wemos d1  project using DHT11 temperature sensor and LCD 20x4 with i2c. The temperature data will display in LCD and sending to the bot telegram. For sending to the bot telegram it works, but why the data cannot display to the LCD? When I tried common charachter like "Hello World!" in the LCD it works. Can you help me? What should I do? Thanks before.
#include "DHT.h"
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F,2,1,0,4,5,6,7,3, POSITIVE);
#define DHTPIN D14  
#define DHTTYPE DHT11   

byte degree[8] = {
  0b00110,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000
};

DHT dht(D14, DHT11);

void setup() {
  lcd.createChar(0, degree);
  Serial.begin(115200);
  Serial.println("DHT11 test!");
  lcd.begin (20, 4);
  dht.begin();
}

void loop() {
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  lcd.setCursor(0, 0); 
  lcd.print("Humi : ");
  lcd.print(h); 
  lcd.print(" %");

  lcd.setCursor(0, 1);
  lcd.print("Temp : ");
  lcd.print(t);
  lcd.print(" C");  
}


user37622: Constant D14 is for Wemos D1 and other esp8266 dev boards mapped in arduino core to esp8266 io pin 4. Pin 4 is used as I2C SDA pin. The LCD uses I2C so pin 4 (D14) can't be used for the sensor.
from pins_arduino.h for Wemos D1 R1:
#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

static const uint8_t D14  = 4;
static const uint8_t D15  = 5;

The origin of this confusing esp8266 io pin to Dx constants mapping is the big Wemos D1. There are esp8266 pins mapped to standard Uno pinout. 


43421: <p>Its my first time make arduino project. I make wemos d1  project using DHT11 temperature sensor and LCD 20x4 with i2c. <strong>The temperature data will display in LCD and sending to the bot telegram.</strong> <strong>For sending to the bot telegram it works, but why the data cannot display to the LCD?</strong> When I tried common charachter like "Hello World!" in the LCD it works. Can you help me? What should I do? Thanks before.</p>

<pre><code>#include "DHT.h"
#include &lt;Wire.h&gt;
#include &lt;LiquidCrystal_I2C.h&gt;
LiquidCrystal_I2C lcd(0x3F,2,1,0,4,5,6,7,3, POSITIVE);
#define DHTPIN D14  
#define DHTTYPE DHT11   

byte degree[8] = {
  0b00110,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000,
  0b00000
};

DHT dht(D14, DHT11);

void setup() {
  lcd.createChar(0, degree);
  Serial.begin(115200);
  Serial.println("DHT11 test!");
  lcd.begin (20, 4);
  dht.begin();
}

void loop() {
  delay(2000);
  float h = dht.readHumidity();
  float t = dht.readTemperature();

  lcd.setCursor(0, 0); 
  lcd.print("Humi : ");
  lcd.print(h); 
  lcd.print(" %");

  lcd.setCursor(0, 1);
  lcd.print("Temp : ");
  lcd.print(t);
  lcd.print(" C");  
}
</code></pre>
 37622: <p>Constant <code>D14</code> is for Wemos D1 and other esp8266 dev boards mapped in arduino core to esp8266 io pin 4. Pin 4 is used as I2C SDA pin. The LCD uses I2C so pin 4 (D14) can't be used for the sensor.</p>

<p>from <code>pins_arduino.h</code> for Wemos D1 R1:</p>

<pre><code>#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

static const uint8_t D14  = 4;
static const uint8_t D15  = 5;
</code></pre>

<p>The origin of this confusing esp8266 io pin to Dx constants mapping is the big Wemos D1. There are esp8266 pins mapped to standard Uno pinout. </p>

<p><a href="https://i.stack.imgur.com/1efzT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1efzT.png" alt="enter image description here"></a></p>
