±â¼úÁö¿ø ¹®ÀÇ
ÆòÀÏ AM 10:00 ~ PM 05:00 / Á¡½É½Ã°£ PM 12:00 ~ PM 01:00
°Þ°í °è½Å Áõ»óÀ» ÀÚ¼¼È÷ ±âÀçÇØÁֽøé ÃÖ´ëÇÑ ¼º½ÇÈ÷ ´äº¯µå¸®°Ú½À´Ï´Ù.
ÁÖ¹®,¹è¼Û,Ãë¼Ò ¹®ÀÇ´Â <1:1 ¹®ÀÇ °Ô½ÃÆÇ>À» ÀÌ¿ëÇØÁֽñ⠹ٶø´Ï´Ù.

´Ã °í°´´ÔÀÇ ¸ñ¼Ò¸®¿¡ ±Í±â¿ïÀÌ´Â ¸ÞÄ«¼Ö·ç¼ÇÀÌ µÇµµ·Ï ³ë·ÂÇÏ°Ú½À´Ï´Ù.
¾îÁ¦ ¿¬¶ôµå·ÈµíÀÌ ÀúÈñ°¡ grove¸ÖƼä³Î ¼¾¼­¸¦ ±¸ÀÔÇÏ°í LCDÈ­¸é¿¡ ¶ç¿ì´Â °úÁ¤¿¡¼­ ÄÚµù ¿À·ù°¡ °è¼Ó ¶ß°í °ªÀÌ ¾ÈÀÐÇô¼­ º¸³»µå¸³´Ï´Ù. µµ¿òÀ» ÁֽŴٸé
Á¤¸» °¨»çÇÏ°Ú½À´Ï´Ù.


/* How to use the DHT-22 sensor with Arduino
   Temperature and humidity sensor and
   I2C LCD1602
   SDA --> A4
   SCL --> A5
   Dev: Panagiotis Papadopoulos // Date: 7/6/2016 // */

//Libraries
#include <DHT.h>;
//I2C LCD:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include "MutichannelGasSensor.h"
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display

//Constants
#define DHTPIN D3     // what pin we're connected to
#define DHTTYPE DHT22   // DHT 22  (AM2302)
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino

//Variables
//int chk;
float hum;  //Stores humidity value
float temp; //Stores temperature value


void setup()
{
    Serial.begin(9600);
    Serial.println("ppdo's Temp and Humidity Sensor Test");
    dht.begin();
    gas.begin(0x04);//the default I2C address of the slave is 0x04
    gas.powerOn();
    lcd.init(); //initialize the lcd
    lcd.backlight(); //open the backlight
}

void loop()
{
    //Read data and store it to variables hum and temp
    // Reading temperature or humidity takes about 250 milliseconds!
   
    hum = dht.readHumidity();
    temp= dht.readTemperature();
    //Print temp and humidity values to serial monitor
    Serial.print("Humidity: ");
    Serial.print(hum,1); ////µÚ¿¡ ¼Ò¼öÁ¡
    Serial.print(" %, Temp: ");
    Serial.print(temp,1); ////µÚ¿¡ ¼Ò¼öÁ¡
    Serial.println("Celsius");
     float c;
 c = gas.measure_NH3();
 Serial.print("NH3: ");
 if(c>=0) Serial.print(c);
 else Serial.print("invalid");
 Serial.println(" ppm");
 c = gas.measure_CO();
 Serial.print("CO: ");
 if(c>=0) Serial.print(c);
 else Serial.print("invalid");
 Serial.println(" ppm");
 c = gas.measure_NO2();
 Serial.print("NO2: ");
 if(c>=0) Serial.print(c);
 else Serial.print("invalid");
 Serial.println(" ppm");

    
// set the cursor to (0,0):
    lcd.setCursor(0, 0);
// print from 0 to 9:

    lcd.print("Temp: ");
    lcd.print(temp,1); ////µÚ¿¡ ¼Ò¼öÁ¡
    lcd.print("C");
  
    lcd.setCursor(0, 1);

    lcd.print("Humidity: ");
    lcd.print(hum,1); //µÚ¿¡ ¼Ò¼öÁ¡
    lcd.print("%");
  
  delay(5000);//Delay 5 sec.
  
   lcd.clear;     -------------------------------------------------------  ÇöÀç À̺κп¡¼­ ¿À·ù°¡ ¶å´Ï´Ù 
   lcd.setCursor(0, 0);
   lcd.print("NH3:");
    lcd.print(NH3,1); ////µÚ¿¡ ¼Ò¼öÁ¡
    lcd.print("ppm");
  
    lcd.setCursor(0, 1);

    lcd.print("CO: ");
    lcd.print(CO,1); //µÚ¿¡ ¼Ò¼öÁ¡
    lcd.print("ppm");
     delay(2000);//Delay 2 sec.
}
±â¼ú°ü·Ã ¹®ÀÇ µå¸³´Ï´Ù Á¤¿ì¿µ
Posted at 2018-04-19 12:58:19


´ÙÀ½±Û ¾ÆµÎÀÌ³ë ±â¼ú °ü·Ã ÀçÁú¹®µå¸³´Ï´Ù.
ÀÌÀü±Û ¾ÆµÎÀÌ³ë °ü·Ã ±â¼ú Áú¹®ÀÔ´Ï´Ù.
´ä±Û
±â¼ú°ü·Ã ¹®ÀÇ µå¸³´Ï´Ù
±â¼ú°ü·Ã ¹®ÀÇ µå¸³´Ï´Ù


°ßÀû¿äû
±¸¸Å´ëÇà
Äü/¹æ¹®¼ö·É
ÈĺҰáÁ¦
±â¼ú¹®ÀÇ