From 042de91dcd2c71ef304c1119d2e15caba47e2c8f Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Sat, 25 Oct 2014 16:38:24 +0400 Subject: [PATCH 1/1] =?utf8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=D0=B0=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?utf8?q?=D0=B0=20=D0=B4=D0=B0=D1=82=D1=87=D0=B8=D0=BA=D0=B0=20=D1=81?= =?utf8?q?=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BF?= =?utf8?q?=D1=80=D0=B8=D0=BC=D0=B5=D1=81=D0=B5=D0=B9=20=D0=B2=20=D0=B0?= =?utf8?q?=D1=82=D0=BC=D0=BE=D1=81=D1=84=D0=B5=D1=80=D0=B5=20(MQ-=D1=81?= =?utf8?q?=D0=B5=D1=80=D0=B8=D1=8F,=20=D0=B0=D0=BD=D0=B0=D0=BB=D0=BE=D0=B3?= =?utf8?q?=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Weather_WH2.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) { -- 2.34.1