Grove Air Quality Sensor.

Fork of Grove_Air_Quality_Sensor_Library by Seeed

Committer:
lucianovici
Date:
Thu Dec 22 22:33:19 2016 +0000
Revision:
1:e312d147cadd
Parent:
0:885417624ec2
Child:
2:95009177a860
Replace printf with debug

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 0:885417624ec2 1 /*
mbedAustin 0:885417624ec2 2 AirQuality library v1.0
mbedAustin 0:885417624ec2 3 2010 Copyright (c) Seeed Technology Inc. All right reserved.
mbedAustin 0:885417624ec2 4
mbedAustin 0:885417624ec2 5 Original Author: Bruce.Qin
mbedAustin 0:885417624ec2 6
mbedAustin 0:885417624ec2 7 This library is free software; you can redistribute it and/or
mbedAustin 0:885417624ec2 8 modify it under the terms of the GNU Lesser General Public
mbedAustin 0:885417624ec2 9 License as published by the Free Software Foundation; either
mbedAustin 0:885417624ec2 10 version 2.1 of the License, or (at your option) any later version.
mbedAustin 0:885417624ec2 11
mbedAustin 0:885417624ec2 12 This library is distributed in the hope that it will be useful,
mbedAustin 0:885417624ec2 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
mbedAustin 0:885417624ec2 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
mbedAustin 0:885417624ec2 15 Lesser General Public License for more details.
mbedAustin 0:885417624ec2 16
mbedAustin 0:885417624ec2 17 You should have received a copy of the GNU Lesser General Public
mbedAustin 0:885417624ec2 18 License along with this library; if not, write to the Free Software
mbedAustin 0:885417624ec2 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
mbedAustin 0:885417624ec2 20 */
mbedAustin 0:885417624ec2 21 #include"mbed.h"
lucianovici 1:e312d147cadd 22 #include "mbed_debug.h"
lucianovici 1:e312d147cadd 23
mbedAustin 0:885417624ec2 24 #ifndef __AIRQUALITY_H__
mbedAustin 0:885417624ec2 25 #define __AIRQUALITY_H__
mbedAustin 0:885417624ec2 26 class AirQuality
mbedAustin 0:885417624ec2 27 {
mbedAustin 0:885417624ec2 28 public:
mbedAustin 0:885417624ec2 29 int i ;
mbedAustin 0:885417624ec2 30 long vol_standard;
mbedAustin 0:885417624ec2 31 int init_voltage;
mbedAustin 0:885417624ec2 32 int first_vol;
mbedAustin 0:885417624ec2 33 int last_vol;
mbedAustin 0:885417624ec2 34 int temp;
mbedAustin 0:885417624ec2 35 int counter;
mbedAustin 0:885417624ec2 36 bool timer_index;
mbedAustin 0:885417624ec2 37 bool error;
mbedAustin 0:885417624ec2 38 void init(PinName pin, void(*IRQ)(void));
mbedAustin 0:885417624ec2 39 int slope(void);
mbedAustin 0:885417624ec2 40 private:
mbedAustin 0:885417624ec2 41 PinName _pin;
mbedAustin 0:885417624ec2 42 void avgVoltage(void);
mbedAustin 0:885417624ec2 43 };
mbedAustin 0:885417624ec2 44 #endif