Tim M / SHT11
Embed: (wiki syntax)

« Back to documentation index

SHT11 Class Reference

SHT11 Class Reference

Simple library for interfacing with Sensirion SHT11. More...

#include <sht11.h>

Public Member Functions

 SHT11 (PinName clkPin, PinName dataPin)
 Create a SHT11 object connected to the specified pins.
void init ()
 Initialise SHT11.

Detailed Description

Simple library for interfacing with Sensirion SHT11.

Revision 1.0

Author:
Tim Meese
Date:
January 201

Example:

 #include "mbed.h"
 #include "sht11.h"
 
//        clk, dat
 SHT11 sht(p7, p8);
 
 int main() {
    
   // initialise display 
  lcd.init();
  // print a string in top-left corner
  lcd.printString("Hello, World!",0,0);
  // move cursor to 4th row
  lcd.setXYAddress(0,3);
  // print character
  lcd.printChar('X');
    
  while(1);
 }

Definition at line 47 of file sht11.h.


Constructor & Destructor Documentation

SHT11 ( PinName  clkPin,
PinName  dataPin 
)

Create a SHT11 object connected to the specified pins.

Parameters:
clkPinPin connected to clk
dataPinPin connected to data

Definition at line 17 of file sht11.cpp.


Member Function Documentation

void init (  )

Initialise SHT11.

Definition at line 84 of file sht11.cpp.