Library for the Sensirion SHT3X-ARP Analog Humidity & Temperature Sensor.

Dependents:   STM32_teste_5

Fork of SHT3XA by ClosedCube Limited

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SHT3XA.h Source File

SHT3XA.h

00001 /*
00002   Copyright (c) 2015 ClosedCube Limited
00003  
00004   Permission is hereby granted, free of charge, to any person obtaining a copy of this software
00005   and associated documentation files (the "Software"), to deal in the Software without restriction,
00006   including without limitation the rights to use, copy, modify, merge, publish, distribute,
00007   sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
00008   furnished to do so, subject to the following conditions:
00009  
00010   The above copyright notice and this permission notice shall be included in all copies or
00011   substantial portions of the Software.
00012  
00013   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
00014   BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00015   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
00016   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00017   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00018  */
00019  
00020 #ifndef SHT3XA_H
00021 #define SHT3XA_H
00022 
00023 #include "mbed.h"
00024 
00025  
00026 //! Library for the Sensirion SHT3X-ARP Analog Humidity & Temperature Sensor.
00027 /*!
00028  SHT3x-ARP is the next generation of Sensirion’s temperature and humidity sensors. 
00029  It builds on a new CMOSens sensor chip that is at the heart of Sensirion's new humidity and temperature platform. 
00030  The SHT3x-ARP has increased intelligence, reliability and improved accuracy specifications compared to its predecessor. 
00031  Its functionality includes enhanced signal processing, temperature and humidity can be read out at different pins. 
00032  The DFN package has a footprint of 2.5 x 2.5 mm while keeping a height of 0.9 mm. 
00033  This allows for integration of the SHT3x-ARP into a great variety of applications. 
00034  Additionally, the wide supply voltage range of 2.4 to 5.5 V guarantees compatibility with diverse assembly situations. 
00035  All in all, the SHT3x-ARP incorporates 15 years of knowledge of Sensirion, the leader in the humidity sensor industry.
00036 */
00037 class SHT3XA
00038 {
00039     
00040 public:
00041 
00042   //!Creates an instance of the class.
00043   SHT3XA(PinName pinRH,PinName pinT);
00044 
00045   //!Reads the current humidity level (%RH)
00046   float readRH();
00047   
00048   //!Reads the current temperature in Celsius
00049   float readTempC();
00050 
00051   //!Reads the current temperature in Fahrenheit
00052   float readTempF();
00053   
00054 private:
00055     AnalogIn _pinRH;
00056     AnalogIn _pinT;
00057  
00058 };
00059  
00060 #endif