ESP8266 Webserver DHT11 Sensor and OLED Display

by IoTFever in Circuits > Wireless

4188 Views, 6 Favorites, 0 Comments

ESP8266 Webserver DHT11 Sensor and OLED Display

ESP8266 webserver DHT11 Sensor and OLED Display

ESP8266 DHT11 Temperature Sensor

This Simple tutorial post shows how to interface the ESP8266 NodeMCU Development Board with DHT11 Digital humidity & Temperature sensor and 0.91 inch OLED display (128×32 Pixel).The NodeMCU reads temperature and relative humidity values from the DHT11 sensor and prints it on OLED display, also you can get temperature and humidity values on mobile web browser.

OLED Display

Organic Light Emitting Diode (OLED) is a kind of Light Emitting Diode where a light emitting layer which is made of organic compound emits light when electric current is supplied. This layer is placed between two electrodes. This technology is used in display screens like computers, televisions, smartphones etc. OLED displays have their own light and don’t need any backlight like in LCD, therefore they are power efficient and used with many microcontrollers. One more advantage of using OLED displays over LCD is of displaying large and better quality of graphics on OLEDs.
There are many types of OLED displays available in the market based on their - Sizes, Color, Brands, Protocol, SPI (Serial Peripheral Interface) or I2C, Passive-matrix (PMOLED) or active-matrix (AMOLED) control scheme In this tutorial, I am going to talk about connecting the, White color 0.91 (128x32 OLED) I2C OLDE displays to an NodeMCU. I2C bus technology uses only 2 pins of the MCU so we have heaps available for other sensors.

The main advantage of OLED display is we can able to print any type of font, shape, color and images.

Why we are using Nodemcu
Nodemcu is a low-cost, WiFi Module chip that can be configured to connect to the Internet for Internet of Things(IoT) and similar Technology Projects. Basically, Your normal Electrical and Mechanical equipment's cannot connect to the Internet on their own. They don’t have the in-built setup to do so. You can setup ESP8266 with these equipment's and do amazing stuff. Controlling, Monitoring, Analysis and much more.

Required Components

nodemcu.jpg
DHT11-Sensor.jpg
oled.jpg
Breadbourd.jpg
jumpper cable.jpg
  • Nodemcu Development Board 330/- Link
  • DHT11 Sensor 210/- Link
  • 0.91 inch OLED Display 330/- Link
  • Breadboard 95/- Link
  • Jumpper Cable

Get Component on Best Price

  • Arduino uno 384/- Link
  • Arduino nano 330/- Link

Required Software

Arduino Software Link

Connecting the Hardware

NodeMCU – OLED Display

  • Nodemcu D1 pin to OLED SCK pin
  • Nodemcu D2 pin to OLED SDA pin
  • Nodemcu (3.3v or 5v) pin to OLED VCC pin
  • Nodemcu GND pin to OLED GND pin
  • Nodemcu D4 pin to DH11 Sensor Data pin
  • Nodemcu (3.3v or 5v) pin to DHT11 Sensor VCC pin
  • Nodemcu GND pin to DHT11 Sensor GND pin

Circuit Diagram

circuit logo.png

Setting Up Arduino IDE

Add zip.png
lib sel.png
Select nodemcu.png

For this project we some library, for downloading this library go to below links

ESPAsyncTCP

ESPAsyncWebServer

Adafruit_Sensor

DHT11

After download open Arduino IDE software Click on Sketch ==> include library ==> Add .Zip library

Click on download folder and search for "ESPAsyncTCP" library and click on it, similarly do for other library.

Now open Arduino IDE software, next to select the board go to Tools ==> Board ==> and search for NodeMCU 1.0(ESP-12E Module) and click on it.

If you don't have Nodemcu board installed then follow the procedure below link.

Installing ESP8266 Board in Arduino IDE

Arduino IDE Code

code.png
ip.png

To get Arduino code just mail me i will send you code. (paid)

Gmail address : iotfever1@gmail.com

To know more about other projects visit official website IoTFever.tech

Then, Download the source code. We need to do some changes, just change your "wifi ssid" and "wifi password".

Now, Compile and upload the source code to the nodemcu, en͏s͏u͏r͏e ͏e͏v͏e͏r͏y͏t͏h͏i͏n͏g ͏i͏s ͏c͏o͏n͏n͏e͏c͏t͏e͏d ͏a͏s ͏d͏e͏s͏c͏r͏i͏b͏e͏d ͏u͏n͏d͏e͏r ͏t͏h͏e ͏s͏c͏h͏e͏m͏a͏t͏i͏c͏s ͏s͏e͏c͏t͏i͏o͏n. ͏a͏f͏t͏e͏r ͏u͏p͏l͏o͏a͏d͏i͏n͏g ͏t͏h͏e ͏c͏o͏d͏e, ͏open serial monitor and y͏o͏u ͏s͏h͏o͏u͏l͏d ͏s͏e͏e ͏t͏h͏e ͏i͏p ͏a͏d͏d͏r͏e͏s͏s ͏o͏f ͏y͏o͏u͏r ͏w͏e͏b ͏s͏e͏r͏v͏e͏r ͏d͏i͏s͏p͏l͏a͏y͏e͏d ͏i͏n ͏t͏h͏e ͏s͏e͏r͏i͏a͏l ͏m͏o͏n͏i͏t͏o͏r ͏a͏s ͏s͏h͏o͏w͏n ͏above.

Mobile Browser

ss1.jpg
ss.jpg

Now, type this IP address in any mobile or laptop browser and press. In your case this IP address is different , every nodemcu microcontrolller have its using IP address.

If you need my help then visit official website IoTFever.tech we will provide custom made project for our clients

That's it for this tutorial. Thanks for reading.
If you have any question about today's tutorial, please feel free to share via the comment section. I hope it will helpful to you..........Thanks.