work.

Dependencies:   Blynk mbed

Committer:
lixianyu
Date:
Thu Jun 16 08:08:30 2016 +0000
Revision:
3:4cd9171ba989
Parent:
2:6cd3b0947188
9600?????ESP8266????????115200??ESP8266?????????9600????????????Timer???????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lixianyu 0:d8f4c441e032 1 //
lixianyu 0:d8f4c441e032 2 // AM2321 Temperature & Humidity Sensor library for Arduino
lixianyu 0:d8f4c441e032 3 // VERSION: 0.1.0
lixianyu 0:d8f4c441e032 4 //
lixianyu 0:d8f4c441e032 5 // The MIT License (MIT)
lixianyu 0:d8f4c441e032 6 //
lixianyu 0:d8f4c441e032 7 // Copyright (c) 2013 Wang Dong
lixianyu 0:d8f4c441e032 8 //
lixianyu 0:d8f4c441e032 9 // Permission is hereby granted, free of charge, to any person obtaining a copy
lixianyu 0:d8f4c441e032 10 // of this software and associated documentation files (the "Software"), to deal
lixianyu 0:d8f4c441e032 11 // in the Software without restriction, including without limitation the rights
lixianyu 0:d8f4c441e032 12 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
lixianyu 0:d8f4c441e032 13 // copies of the Software, and to permit persons to whom the Software is
lixianyu 0:d8f4c441e032 14 // furnished to do so, subject to the following conditions:
lixianyu 0:d8f4c441e032 15 //
lixianyu 0:d8f4c441e032 16 // The above copyright notice and this permission notice shall be included in
lixianyu 0:d8f4c441e032 17 // all copies or substantial portions of the Software.
lixianyu 0:d8f4c441e032 18 //
lixianyu 0:d8f4c441e032 19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
lixianyu 0:d8f4c441e032 20 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
lixianyu 0:d8f4c441e032 21 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
lixianyu 0:d8f4c441e032 22 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
lixianyu 0:d8f4c441e032 23 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
lixianyu 0:d8f4c441e032 24 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
lixianyu 0:d8f4c441e032 25 // THE SOFTWARE.
lixianyu 0:d8f4c441e032 26 //
lixianyu 0:d8f4c441e032 27
lixianyu 0:d8f4c441e032 28 #ifndef __ARDUINO_AM2321_H__
lixianyu 0:d8f4c441e032 29 #define __ARDUINO_AM2321_H__
lixianyu 2:6cd3b0947188 30
lixianyu 0:d8f4c441e032 31 #define LIBAM2321_VERSION "0.1.0"
lixianyu 0:d8f4c441e032 32
lixianyu 0:d8f4c441e032 33 class AM2321
lixianyu 0:d8f4c441e032 34 {
lixianyu 0:d8f4c441e032 35 public:
lixianyu 0:d8f4c441e032 36 int temperature;
lixianyu 0:d8f4c441e032 37 unsigned int humidity;
lixianyu 0:d8f4c441e032 38 public:
lixianyu 0:d8f4c441e032 39 bool read();
lixianyu 0:d8f4c441e032 40 bool available();
lixianyu 0:d8f4c441e032 41 public:
lixianyu 2:6cd3b0947188 42 unsigned long uid();
lixianyu 0:d8f4c441e032 43
lixianyu 0:d8f4c441e032 44 public:
lixianyu 0:d8f4c441e032 45 AM2321();
lixianyu 0:d8f4c441e032 46 };
lixianyu 0:d8f4c441e032 47
lixianyu 0:d8f4c441e032 48 #endif
lixianyu 2:6cd3b0947188 49
lixianyu 0:d8f4c441e032 50 //
lixianyu 0:d8f4c441e032 51 // END OF FILE
lixianyu 0:d8f4c441e032 52 //