Dependencies:
               
        
     
    
        
             
            mbed
         
    
        
             
            Sht31
         
    
    
« Back to documentation index 
    
 
SHT15 Class Reference 
 
 
  
Class: SHT15  Humidity and Temperature Sensor - SHT15  High level software interface.  
More... 
#include <sht15.hpp >
 
Public Member Functions 
float  getTemperature  (void) 
  Function: getTemperature Returns the current temperature.    
float  getHumidity  (void) 
  Function: getHumidity Returns the current relative humidity.    
bool  checkBattery  (void) 
  Function: checkBattery Returns true if battery voltage drops below 2.4 volt.    
bool  setHeater  (bool value) 
  Function: setHeater Enable on chip heating element.    
bool  setResolution  (bool value) 
  Function: setResolution Set lower measurement resolution to allow faster update frequencies.    
bool  setOTPReload  (bool value) 
  Function: setOTPReload With this operation the calibration data is uploaded to the register before each measurement.    
void  setScale  (bool value) 
  Function: setScale Sets output scale to fahrenheit or celcius.    
bool  update  (void) 
  Function: update Performs humidity and temperature sensor readout of the chip.    
bool  reset  (void) 
  Function: reset Resets the interface, clears the status register to default values.    
void  connectionReset  (void) 
  Function: connectionReset If communication with the device is lost the command will reset the serial interface.    
Detailed Description 
Class: SHT15  Humidity and Temperature Sensor - SHT15  High level software interface. 
Definition at line 39  of file sht15.hpp .
Member Function Documentation 
 
      
        
          bool checkBattery  
          ( 
          void  
           ) 
           
         
      
 
Function: checkBattery Returns true if battery voltage drops below 2.4 volt. 
Values: returns - true on low battery, false otherwise 
Definition at line 54  of file sht15.cpp .
 
 
 
      
        
          void connectionReset  
          ( 
          void  
           ) 
           
         
      
 
Function: connectionReset If communication with the device is lost the command will reset the serial interface. 
Definition at line 117  of file sht15.cpp .
 
 
 
      
        
          float getHumidity  
          ( 
          void  
           ) 
           
         
      
 
Function: getHumidity Returns the current relative humidity. 
Values: returns - relative humidity. 
Definition at line 45  of file sht15.cpp .
 
 
 
      
        
          float getTemperature  
          ( 
          void  
           ) 
           
         
      
 
Function: getTemperature Returns the current temperature. 
Values: returns - current temperature. 
Definition at line 36  of file sht15.cpp .
 
 
 
Function: reset Resets the interface, clears the status register to default values. 
And waits for a minimum of 11ms.
Values: return - operation result 
Definition at line 94  of file sht15.cpp .
 
 
 
      
        
          bool setHeater  
          ( 
          bool  
           value  ) 
           
         
      
 
Function: setHeater Enable on chip heating element. 
The heater may increase the temperature of the sensor by 5C to 10C beyond ambient temperature.
Values: value - true->on, false->off return - operation result 
Definition at line 60  of file sht15.cpp .
 
 
 
      
        
          bool setOTPReload  
          ( 
          bool  
           value  ) 
           
         
      
 
Function: setOTPReload With this operation the calibration data is uploaded to the register before each measurement. 
This may be deactivated for reducing measurement time by about 10ms
Values: value - true->enabled, false->disabled 
Definition at line 72  of file sht15.cpp .
 
 
 
      
        
          bool setResolution  
          ( 
          bool  
           value  ) 
           
         
      
 
Function: setResolution Set lower measurement resolution to allow faster update frequencies. 
Resolutions low: 8bit humid. - 12bit temp. high: 12bit humid. - 14bit temp.
Values: value - true->low, false->high return - operation result 
Definition at line 66  of file sht15.cpp .
 
 
 
      
        
          void setScale  
          ( 
          bool  
           value  ) 
           
         
      
 
Function: setScale Sets output scale to fahrenheit or celcius. 
Values: value - true->fahrenheit, false->celcius 
Definition at line 78  of file sht15.cpp .
 
 
 
Function: update Performs humidity and temperature sensor readout of the chip. 
Values: return - operation result 
Definition at line 83  of file sht15.cpp .