X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/6c7c64de24a54d6bea09cb5a179d3a4c630c13ef..042de91dcd2c71ef304c1119d2e15caba47e2c8f:/Weather_WH2.ino diff --git a/Weather_WH2.ino b/Weather_WH2.ino index 175721e..a61dbff 100644 --- a/Weather_WH2.ino +++ b/Weather_WH2.ino @@ -17,7 +17,7 @@ BMP085 bmp; // Humidity sensor at pin 4 #define DHT11PIN 5 - +int sensorPin = 0; #define DEBUG // LED pins @@ -182,6 +182,7 @@ float pressure; void loop() { unsigned long now; + int gas = 0; byte i; now = millis(); @@ -258,6 +259,10 @@ void loop() { Serial1.print(",TEMPERATURE="); Serial1.println(temperature); + gas = analogRead(sensorPin); // Получаем значения из датчика + Serial1.print("SENSOR:TYPE=GAS,VALUE="); + Serial1.println(gas); // Пишем в серийный порт + } if ((unsigned long)(now - previousIndoor) > indoor_interval*10) {