Indoor Environment Monitoring

Indoor Environment Monitoring

Experimental introduction

In this experiment we will use three modules to collect data such as light, temperature, humidity and atmospheric pressure. At the same time, the data is sent and displayed on the LCD12854 through the serial port.

Experimental Materials

1X  Adeept UNO Board

1X  DHT-11 Module

1X  Photoresistor Module

1X  Barometer Module

1X  LCD12864 Module

1X  Breadboard

Some jumpers

Experimental connection diagram

Experiment code

File name:   AdeeptLCD12864.ino
Author: Tom
Date: 2019/03/20 
#include <Adeept_LCD12864RSPI.h>
#include <Adeept_DHT11.h>
#include <Adeept_BMP180.h>
#define AR_SIZE( a ) sizeof( a ) / sizeof( a[0] )
Adeept_DHT11 Adeept_dht11;
Adeept_BMP180 Adeept_bmp180(0x77);//I2C address of BMP180
#define DHT11PIN 2  //Set the digital 2 to the S pin

int photoresistorPin = 0;          // photoresistor  connected to analog pin 0
unsigned char show0[]=" photoresistor";         //Test the code
unsigned char show1[]=" analog:       ";     
unsigned char show2[]="";  
unsigned char show3[]="DHT11 sensor";      
unsigned char show4[]="Humi:       %";    
unsigned char show5[]="Temp:       %";
unsigned char show6[]="   Pressure  ";       
unsigned char show7[] = "Pr:          Pa ";
unsigned char show8[] = "Atm:       ";
unsigned char show9[] = "Alti:        M  ";

int btnpin1 = 12;           //Set the digital 12 to button module interface 
int btnpin2 = 13;           //Set the digital 13 to button module interface      

int pageNumber = 1;
void setup()
    pinMode(photoresistorPin, INPUT);//Set analog 0 port mode, the INPUT for the input
    Serial.begin(9600);   //opens serial port, sets data rate to 9600 bps
    pinMode(btnpin1,INPUT); //Set digital 12 port mode, the INPUT for the input
    pinMode(btnpin2,INPUT); //Set digital 13 port mode, the INPUT for the input
    Adeept_12864.Initialise(); // The screen is initialized
void loop()
    double dataphotoresistor = 0;
    char strphotoresistor[5];
    double temphumidity = 0;
    double tempTemperature = 0;
    char strhumidity[5];
    char strTemperature[5];
    char strPressure[7];
    char strAtm[3];
    char strAltitude[5];
    dataphotoresistor = analogRead(photoresistorPin);
    Serial.print("photoresistor: "); //send data to the serial monitor
    Serial.println(dataphotoresistor); //send data to the serial monitor;
    temphumidity = Adeept_dht11.humidity;
    Serial.print("humidity: "); //send data to the serial monitor
    Serial.print(temphumidity); //send data to the serial monitor
    Serial.println("%"); //send data to the serial monitor

    tempTemperature = Adeept_dht11.temperature;
    Serial.print("temperature: "); //send data to the serial monitor
    Serial.print(tempTemperature); //send data to the serial monitor
    Serial.println("C"); //send data to the serial monitor

    double dataTemperature = Adeept_bmp180.GetTemperature(); //MUST be called first
    float dataPressure = Adeept_bmp180.GetPressure();
    float dataAtm = dataPressure / 101325; // "standard atmosphere"
    float dataAltitude = Adeept_bmp180.calcAltitude(dataPressure); //Uncompensated caculation - in Meters

    Serial.print("Temperature: "); //send data to the serial monitor
    Serial.print(dataTemperature); //send data to the serial monitor
    Serial.println("C"); //send data to the serial monitor

    Serial.print("Pressure: "); //send data to the serial monitor
    Serial.print(dataPressure); //send data to the serial monitor
    Serial.println("Pa"); //send data to the serial monitor

    Serial.print("Atm: "); //send data to the serial monitor
    Serial.println(dataAtm); //send data to the serial monitor

    Serial.print("Altitude: "); //send data to the serial monitor
    Serial.print(dataAltitude); //send data to the serial monitor 
    Serial.println("M"); //send data to the serial monitor 

      dtostrf(dataphotoresistor,4,0,strphotoresistor);//Converts a floating-point number to a string
      Adeept_12864.DisplayString(0,0,show0,AR_SIZE(show0));//Display: photoresistor
      Adeept_12864.DisplayString(1,0,show1,AR_SIZE(show1));//Display: analog: 
      Adeept_12864.DisplayString(1,4,(unsigned char *)strphotoresistor,4);//Display photoresistor data

      dtostrf(temphumidity,5,2,strTemperature);//Converts a floating-point number to a string
      dtostrf(tempTemperature,5,2, strhumidity );//Converts a floating-point number to a string
      Adeept_12864.DisplayString(0,1,show3,AR_SIZE(show3));//Display: DHT11 sensor
      Adeept_12864.DisplayString(1,1,show4,AR_SIZE(show4));//Display: Humi:     %
      Adeept_12864.DisplayString(1,4,(unsigned char *)strTemperature,5);//Display humidity data  
      Adeept_12864.DisplayString(2,1,show5,AR_SIZE(show5));//Display: Temp:     C
      Adeept_12864.DisplayString(2,4,(unsigned char *)strhumidity,6);//Display temperature data

      dtostrf(dataPressure, 6, 2, strPressure); //Converts a floating-point number to a string
      dtostrf(dataAtm, 2, 2, strAtm); //Converts a floating-point number to a string
      dtostrf(dataAltitude, 4, 2, strAltitude); //Converts a floating-point number to a string
      Adeept_12864.DisplayString(0, 0, show6, AR_SIZE(show6)); //Display: Temp:      C
      Adeept_12864.DisplayString(1, 0, show7, AR_SIZE(show7)); //Display: Pr:        Pa
      Adeept_12864.DisplayString(1, 2, (unsigned char *)strPressure, 8); //Display temperature data
      Adeept_12864.DisplayString(2, 0, show8, AR_SIZE(show8)); //Display: Atm:         Pa
      Adeept_12864.DisplayString(2, 2, (unsigned char *)strAtm, 4); //Display temperature data
      Adeept_12864.DisplayString(3, 0, show9, AR_SIZE(show9)); //Display: Altitude:     M
      Adeept_12864.DisplayString(3, 3, (unsigned char *)strAltitude, 6); //Display temperature data  
  if(digitalRead(btnpin1)==LOW)              //Detection button interface to low
      delay(10);                              //Delay 10ms for the elimination of key leading-edge jitter
      if(digitalRead(btnpin1)==LOW)           //Confirm button is pressed
        Adeept_12864.CLEAR();//Clear screen
  if(digitalRead(btnpin2)==LOW)              //Detection button interface to low
      delay(10);                              //Delay 10ms for the elimination of key leading-edge jitter
      if(digitalRead(btnpin2)==LOW)           //Confirm button is pressed
        Adeept_12864.CLEAR();//Clear screen


Experimental phenomena

Press the two buttons to control the LCD12864 to display page turning, switch display information such as illumination, temperature and humidity.

188 Replies to “Indoor Environment Monitoring”

  1. Pingback: viagra pill
  2. Pingback: acheter cialis
  3. Pingback: mastercard cialis
  4. Pingback: viagra uk paypal
  5. Pingback: discount viagra
  6. Pingback: generic for viagra
  7. Pingback: order viagra
  8. Pingback: 1
  9. Pingback: herbal viagra
  10. Pingback: viagra connect
  11. Pingback: Duna 2021
  12. Pingback: drugs like cialis
  13. Pingback: buy cialis pills
  14. Pingback: cialis best price
  15. Pingback: order cialis
  16. Pingback: canada viagra
  17. Pingback: buy sildenafil
  18. Pingback: cymbalta 60mg
  19. Pingback: pfizer pgn 300
  20. Pingback: free trial cialis
  21. Pingback: psiholog
  22. Pingback: Suicide Squad 2
  23. Pingback:
  24. Pingback:
  25. Pingback:
  26. Pingback:
  27. Pingback: KremlinTeam
  28. Pingback: link
  29. Pingback: A3ixW7AS
  30. 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 :

    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

  31. Pingback: ukraine
  32. Pingback: vechernyy urgant
  33. Pingback: Porno
  34. Pingback: 66181
  35. Pingback: blogery_i_dorogi
  36. Pingback: bender na4alo 2021
  37. Pingback:
  38. Pingback: chelovek-iz-90-h
  39. Pingback: what is in cialis
  40. Pingback: top
  41. Pingback: generic cialis
  42. Pingback: site
  43. Pingback: Ukrainskie-serialy
  44. Pingback: video
  45. Pingback: topvideos
  46. Pingback:
  47. Pingback: projectio-freid
  48. Pingback: psy2022
  49. Pingback: psy
  50. Pingback: news news news
  51. Pingback: 4569987
  52. Pingback: Zakhar Berkut hd
  53. Pingback: price of cialis
  54. Pingback: viagra
  55. Pingback: Viagra Gold
  56. Pingback: viagra vs cialis
  57. Pingback: is viagra safe
  58. Pingback: viagra coupon
  59. Pingback: cialis for sale
  60. Pingback: buy cialis online
  61. Pingback: Glock 17
  62. Pingback: Grand Power CP380
  63. Pingback: GLOCK 48
  64. Pingback: cach vao 12 bet
  65. Pingback: idrpoker
  66. Pingback: nagaqq
  67. Pingback: jaguarqq
  68. Pingback: fun88vnd
  69. Pingback: tutors
  70. Pingback: THC Carts for sale
  71. Pingback: Sonus Complete
  72. Pingback: w88
  73. Pingback: tong trong lo de
  74. Pingback: CBD Spray
  75. Pingback: vpn with webmoney
  76. Pingback: keto pills
  77. Pingback:
  78. Pingback: Skrotbilar hämtas
  79. Pingback: w88tips
  80. Pingback: slotxo
  81. Pingback: Homepage
  82. Pingback: How to lose weight
  83. Pingback: look at this site
  84. Pingback: Qənnadı şokolad
  85. Pingback: ship a car
  86. Pingback: republic of Panama
  87. Pingback: parcourir le site
  88. Pingback: 토토사이트
  89. Pingback: großer Schwanz
  90. Pingback: prediksi hk

Leave a Reply