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

Dependents:   STM32_teste_5

Fork of SHT3XA by ClosedCube Limited

Committer:
ClosedCube
Date:
Sun Sep 13 20:39:47 2015 +0000
Revision:
0:f0757a25e239
SHT3x-ARP sensor library added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ClosedCube 0:f0757a25e239 1 /*
ClosedCube 0:f0757a25e239 2 Copyright (c) 2015 ClosedCube Limited
ClosedCube 0:f0757a25e239 3
ClosedCube 0:f0757a25e239 4 Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ClosedCube 0:f0757a25e239 5 and associated documentation files (the "Software"), to deal in the Software without restriction,
ClosedCube 0:f0757a25e239 6 including without limitation the rights to use, copy, modify, merge, publish, distribute,
ClosedCube 0:f0757a25e239 7 sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ClosedCube 0:f0757a25e239 8 furnished to do so, subject to the following conditions:
ClosedCube 0:f0757a25e239 9
ClosedCube 0:f0757a25e239 10 The above copyright notice and this permission notice shall be included in all copies or
ClosedCube 0:f0757a25e239 11 substantial portions of the Software.
ClosedCube 0:f0757a25e239 12
ClosedCube 0:f0757a25e239 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ClosedCube 0:f0757a25e239 14 BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ClosedCube 0:f0757a25e239 15 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ClosedCube 0:f0757a25e239 16 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ClosedCube 0:f0757a25e239 17 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ClosedCube 0:f0757a25e239 18 */
ClosedCube 0:f0757a25e239 19
ClosedCube 0:f0757a25e239 20 #ifndef SHT3XA_H
ClosedCube 0:f0757a25e239 21 #define SHT3XA_H
ClosedCube 0:f0757a25e239 22
ClosedCube 0:f0757a25e239 23 #include "mbed.h"
ClosedCube 0:f0757a25e239 24
ClosedCube 0:f0757a25e239 25
ClosedCube 0:f0757a25e239 26 //! Library for the Sensirion SHT3X-ARP Analog Humidity & Temperature Sensor.
ClosedCube 0:f0757a25e239 27 /*!
ClosedCube 0:f0757a25e239 28 SHT3x-ARP is the next generation of Sensirion’s temperature and humidity sensors.
ClosedCube 0:f0757a25e239 29 It builds on a new CMOSens sensor chip that is at the heart of Sensirion's new humidity and temperature platform.
ClosedCube 0:f0757a25e239 30 The SHT3x-ARP has increased intelligence, reliability and improved accuracy specifications compared to its predecessor.
ClosedCube 0:f0757a25e239 31 Its functionality includes enhanced signal processing, temperature and humidity can be read out at different pins.
ClosedCube 0:f0757a25e239 32 The DFN package has a footprint of 2.5 x 2.5 mm while keeping a height of 0.9 mm.
ClosedCube 0:f0757a25e239 33 This allows for integration of the SHT3x-ARP into a great variety of applications.
ClosedCube 0:f0757a25e239 34 Additionally, the wide supply voltage range of 2.4 to 5.5 V guarantees compatibility with diverse assembly situations.
ClosedCube 0:f0757a25e239 35 All in all, the SHT3x-ARP incorporates 15 years of knowledge of Sensirion, the leader in the humidity sensor industry.
ClosedCube 0:f0757a25e239 36 */
ClosedCube 0:f0757a25e239 37 class SHT3XA
ClosedCube 0:f0757a25e239 38 {
ClosedCube 0:f0757a25e239 39
ClosedCube 0:f0757a25e239 40 public:
ClosedCube 0:f0757a25e239 41
ClosedCube 0:f0757a25e239 42 //!Creates an instance of the class.
ClosedCube 0:f0757a25e239 43 SHT3XA(PinName pinRH,PinName pinT);
ClosedCube 0:f0757a25e239 44
ClosedCube 0:f0757a25e239 45 //!Reads the current humidity level (%RH)
ClosedCube 0:f0757a25e239 46 float readRH();
ClosedCube 0:f0757a25e239 47
ClosedCube 0:f0757a25e239 48 //!Reads the current temperature in Celsius
ClosedCube 0:f0757a25e239 49 float readTempC();
ClosedCube 0:f0757a25e239 50
ClosedCube 0:f0757a25e239 51 //!Reads the current temperature in Fahrenheit
ClosedCube 0:f0757a25e239 52 float readTempF();
ClosedCube 0:f0757a25e239 53
ClosedCube 0:f0757a25e239 54 private:
ClosedCube 0:f0757a25e239 55 AnalogIn _pinRH;
ClosedCube 0:f0757a25e239 56 AnalogIn _pinT;
ClosedCube 0:f0757a25e239 57
ClosedCube 0:f0757a25e239 58 };
ClosedCube 0:f0757a25e239 59
ClosedCube 0:f0757a25e239 60 #endif