Microduino

Dependencies:   mbed

Fork of Io_moon by Li Weiyi

Committer:
lixianyu
Date:
Fri Jun 24 02:06:43 2016 +0000
Revision:
1:e34100dd6532
Parent:
0:740c1eb2df13
?Arduino??????????0~255??????LPC824????????????????

Who changed what in which revision?

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