Removed the long initial wait
Dependents: Group4_WaterCollector_System
Air_Quality.h@1:8468b6ef791a, 2022-08-27 (annotated)
- Committer:
- johnanthonyjose
- Date:
- Sat Aug 27 01:46:45 2022 +0000
- Revision:
- 1:8468b6ef791a
- Parent:
- 0:885417624ec2
Final Version for presentation
Who changed what in which revision?
User | Revision | Line number | New 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" |
mbedAustin | 0:885417624ec2 | 22 | #ifndef __AIRQUALITY_H__ |
mbedAustin | 0:885417624ec2 | 23 | #define __AIRQUALITY_H__ |
mbedAustin | 0:885417624ec2 | 24 | class AirQuality |
mbedAustin | 0:885417624ec2 | 25 | { |
mbedAustin | 0:885417624ec2 | 26 | public: |
mbedAustin | 0:885417624ec2 | 27 | int i ; |
mbedAustin | 0:885417624ec2 | 28 | long vol_standard; |
mbedAustin | 0:885417624ec2 | 29 | int init_voltage; |
mbedAustin | 0:885417624ec2 | 30 | int first_vol; |
mbedAustin | 0:885417624ec2 | 31 | int last_vol; |
mbedAustin | 0:885417624ec2 | 32 | int temp; |
mbedAustin | 0:885417624ec2 | 33 | int counter; |
mbedAustin | 0:885417624ec2 | 34 | bool timer_index; |
mbedAustin | 0:885417624ec2 | 35 | bool error; |
mbedAustin | 0:885417624ec2 | 36 | void init(PinName pin, void(*IRQ)(void)); |
mbedAustin | 0:885417624ec2 | 37 | int slope(void); |
mbedAustin | 0:885417624ec2 | 38 | private: |
mbedAustin | 0:885417624ec2 | 39 | PinName _pin; |
mbedAustin | 0:885417624ec2 | 40 | void avgVoltage(void); |
mbedAustin | 0:885417624ec2 | 41 | }; |
mbedAustin | 0:885417624ec2 | 42 | #endif |