K Gray
Published

Temperature & Humidity with ESP8266 & Blynk

This tutorial is about making a temperature and humidity wifi node with Blynk.

BeginnerFull instructions provided30 minutes2,103
Temperature & Humidity with ESP8266 & Blynk

Things used in this project

Hardware components

Wemos D1 Mini
Espressif Wemos D1 Mini
×1
DHT11 Temperature & Humidity Sensor (4 pins)
DHT11 Temperature & Humidity Sensor (4 pins)
×1
PCB board and pin headers
×1
Small Wire
×1

Software apps and online services

Blynk
Blynk
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

PCB Gerber File

Schematics

Schematic

Code

D1-MINI and DHT11 Code

C/C++
#define BLYNK_PRINT Serial

#include <Wire.h>
#include <SimpleDHT.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

SimpleDHT11 dht11(14);

char auth[] = "your_auth";
char ssid[] = "your_ssid";
char pass[] = "your_pass";

void setup() {
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}

void loop() {
  byte temperature = 0;
  byte humidity = 0;
  int err = SimpleDHTErrSuccess;
  if ((err = dht11.read(&temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
    Serial.println("DHT Fail");    //while(1);
  }

  Serial.println("Sending data!");
  Blynk.virtualWrite(V4, (temperature*1.8)+32);
  Blynk.virtualWrite(V5, humidity);
  Blynk.run();
  delay(2000);
}

Credits

K Gray

K Gray

22 projects • 21 followers
I love making things out of electronic components, coding in python and C++, designing PCBs and lots more.

Comments