Temperature and humidity displayed on the LCD12864

Temperature and humidity displayed on the LCD12864

Introduction
Adeept DHT11 is a composite digital thermal sensor that integrates temperature and humidity detection. It can convert the temperature and humidity analog values into digital values via corresponding sensitive components and built-in circuits, which can be directly read by computer or other data collecting devices.
In this experiment, by programming the Arduino, we read the temperature and humidity data collected by the DHT11 module by pin D2 of the Arduino board and display it on the LCD 12864.
Components
– 1 * Adeept UNO R3 Board
– 1 * LCD 12864 Module
– 1 * DHT-11 Sensor Module
– 1 * Breadboard
– 1 * USB Cable
– 1 * 3-Pin Wires
– 2 * Male To Male Jumper Wires
– 8 * Male To Female Jumper Wires

Experimental Principle 

SPI12864 SPI communication timing diagram

The Adeept Fritzing image:

Pin definition:

The schematic diagram:

Experimental Procedures
Step 1: Build the circuit

Step 2: Program  AdeeptDHT11LCD12864.ino

Adeept_DHT11 Library Link:Adeept_DHT11

/***********************************************************
File name:   AdeeptDHT11LCD12864.ino
Website: www.adeept.com
E-mail: support@adeept.com
Author: Tom
Date: 2017/01/04 
***********************************************************/
#include "AdeeptLCD12864RSPI.h"
#include <dht11.h>
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
dht11 DHT11;
#define DHT11PIN 2  //Set the digital 2 to the S pin

unsigned char show0[]="DHT11 sensor";         //Test the code
unsigned char show1[]="Humi:       %";     
unsigned char show2[]="Temp:       C";   
unsigned char show3[]=" www.adeept.com";          


void setup()
{
    LCDA.Initialise(); // The screen is initialized
    delay(100);
 // LCDA.CLEAR();//Clear screen
    delay(100);
    LCDA.DisplayString(0,1,show0,AR_SIZE(show0));//Display: DHT11 sensor
    delay(100);
    LCDA.DisplayString(1,1,show1,AR_SIZE(show1));//Display: Humi:     %
    delay(100);
    LCDA.DisplayString(2,1,show2,AR_SIZE(show2));//Display: Temp:     C
    delay(100);
    LCDA.DisplayString(3,0,show3,AR_SIZE(show3));//Display: www.adeept.com
}

void loop()
{
    double temphumidity = 0;
    double tempTemperature = 0;
    char strhumidity[5];
    char strTemperature[5];
    
    double chk = DHT11.read(DHT11PIN);
   
    temphumidity = DHT11.humidity;
    dtostrf(temphumidity,5,2,strhumidity);//Converts a floating-point number to a string
    LCDA.DisplayString(1,4,(unsigned char *)strhumidity,6);//Display humidity data

    tempTemperature = DHT11.temperature;
    dtostrf(tempTemperature,5,2,strTemperature);//Converts a floating-point number to a string
    LCDA.DisplayString(2,4,(unsigned char *)strTemperature,6);//Display temperature data
    delay(5000);

}

Step 3: Compile and download the sketch to the UNO R3 board.

 

50 Replies to “Temperature and humidity displayed on the LCD12864”

  1. Here at Leslie’s Pugsland Breeder, Our beautiful fawn pug has given birth to 4 healthy Pug puppies.
    She is our beloved family dog and this is her 1st litter.
    Both mum and dad are AKC registered with 5 gen pedigree certificate. Both from Top Champion bloodlines.Mum and Dad can be seen. Puppies have been wormed weeks 2,4,6,8 and will have had a flea preventative treatment before leaving us.
    They will have their vet check, 1st vaccinations and microchip.
    To view all available puppies and recent pictures, Search us in google as LESLIE’S PUGSLAND BREEDER or click on our website link bellow : https://pugslandbreeder.company.com/
    Pug Puppies for sale | pug for sale near me | pug puppy for sale | pug puppy | pug for sale | pug puppies for sale in va | black pug puppies for sale

  2. Pingback: Zastave Arms CZ999
  3. Pingback: w88
  4. Pingback: math homework help
  5. Pingback: dumps and pin
  6. Pingback: Electricity Plans
  7. Pingback: click here
  8. Pingback: lowes credit card
  9. Pingback: site
  10. Pingback: CBD Spray
  11. Pingback: vpn with verge
  12. Pingback: be your own boss
  13. Pingback: gogoanime.link
  14. Pingback: How to lose weight
  15. Pingback: سایت پوکر
  16. Pingback: waist trainer
  17. Pingback: look these up
  18. Pingback: W88
  19. Pingback: filmaionline.net
  20. Pingback: asik qq
  21. Pingback: 먹튀검증
  22. Pingback: live cams
  23. Pingback: home work
  24. Pingback: garden tools
  25. Pingback: CBD Oil Stockport
  26. Pingback: rent boat
  27. Pingback: 먹튀사이트

Leave a Reply