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.

239 Replies to “Indoor Environment Monitoring”

  1. Pingback: extra super viagra
  2. Pingback: cialis tadalafil
  3. Pingback: buy viagra online
  4. Pingback: Dead-Inside
  5. Pingback: arrogant
  6. Pingback: ne-smotrite-naverx
  7. Pingback: acheter viagra
  8. Pingback: meritroyalbet
  9. Pingback:
  10. Pingback: azithromycin 500mg
  11. Pingback: eurocasino
  12. Pingback: eurocasino
  13. Pingback: meritroyalbet
  14. Pingback: madridbet
  15. Pingback: eurocasino
  16. Pingback: elexusbet
  17. Pingback: meritking
  18. Pingback: viagra 25mg price
  19. Pingback: cvs viagra
  20. Pingback: viagra and cialis
  21. Pingback: sildenafil goodrx
  22. Pingback: cialis or viagra
  23. Pingback: otc viagra
  24. Pingback: viagra 150mg
  25. Pingback: viagra cost
  26. Pingback: viagra boys
  27. Pingback: cialis trial
  28. Pingback: viagra pour homme
  29. Pingback: pfizer viagra
  30. Pingback: homemade viagra
  31. Pingback: viagra walmart
  32. Pingback:
  33. Pingback: viagra receptfritt
  34. Pingback: cheapest viagra
  35. Pingback: female viagra
  36. Pingback: ed pills gnc
  37. Pingback: viagra pill
  38. Pingback: acheter cialis
  39. Pingback: mastercard cialis
  40. Pingback: viagra uk paypal
  41. Pingback: discount viagra
  42. Pingback: generic for viagra
  43. Pingback: order viagra
  44. Pingback: 1
  45. Pingback: herbal viagra
  46. Pingback: viagra connect
  47. Pingback: Duna 2021
  48. Pingback: drugs like cialis
  49. Pingback: buy cialis pills
  50. Pingback: cialis best price
  51. Pingback: order cialis
  52. Pingback: canada viagra
  53. Pingback: buy sildenafil
  54. Pingback: cymbalta 60mg
  55. Pingback: pfizer pgn 300
  56. Pingback: free trial cialis
  57. Pingback: psiholog
  58. Pingback: Suicide Squad 2
  59. Pingback:
  60. Pingback:
  61. Pingback:
  62. Pingback:
  63. Pingback: KremlinTeam
  64. Pingback: link
  65. Pingback: A3ixW7AS
  66. 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

  67. Pingback: ukraine
  68. Pingback: vechernyy urgant
  69. Pingback: Porno
  70. Pingback: 66181
  71. Pingback: blogery_i_dorogi
  72. Pingback: bender na4alo 2021
  73. Pingback:
  74. Pingback: chelovek-iz-90-h
  75. Pingback: what is in cialis
  76. Pingback: top
  77. Pingback: generic cialis
  78. Pingback: site
  79. Pingback: Ukrainskie-serialy
  80. Pingback: video
  81. Pingback: topvideos
  82. Pingback:
  83. Pingback: projectio-freid
  84. Pingback: psy2022
  85. Pingback: psy
  86. Pingback: news news news
  87. Pingback: 4569987
  88. Pingback: Zakhar Berkut hd
  89. Pingback: price of cialis
  90. Pingback: viagra
  91. Pingback: Viagra Gold
  92. Pingback: viagra vs cialis
  93. Pingback: is viagra safe
  94. Pingback: viagra coupon
  95. Pingback: cialis for sale
  96. Pingback: buy cialis online
  97. Pingback: Glock 17
  98. Pingback: Grand Power CP380
  99. Pingback: GLOCK 48
  100. Pingback: cach vao 12 bet
  101. Pingback: idrpoker
  102. Pingback: nagaqq
  103. Pingback: jaguarqq
  104. Pingback: fun88vnd
  105. Pingback: tutors
  106. Pingback: THC Carts for sale
  107. Pingback: Sonus Complete
  108. Pingback: w88
  109. Pingback: tong trong lo de
  110. Pingback: CBD Spray
  111. Pingback: vpn with webmoney
  112. Pingback: keto pills
  113. Pingback:
  114. Pingback: Skrotbilar hämtas
  115. Pingback: w88tips
  116. Pingback: slotxo
  117. Pingback: Homepage
  118. Pingback: How to lose weight
  119. Pingback: look at this site
  120. Pingback: Qənnadı şokolad
  121. Pingback: ship a car
  122. Pingback: republic of Panama
  123. Pingback: parcourir le site
  124. Pingback: 토토사이트
  125. Pingback: großer Schwanz
  126. Pingback: prediksi hk

Leave a Reply