Added a GPIO to power on/off for external I2C sensor(s) (with LEDs)

Dependencies:   UniGraphic mbed vt100

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SMTC502AT.h Source File

SMTC502AT.h

00001 #ifndef _SMTC502AT_H_
00002 #define _SMTC502AT_H_
00003 
00004 #include "mbed.h"
00005 
00006 /** 
00007  * Semitec 502AT-11 temperature sensor 
00008  */
00009  
00010 class SMTC502AT {
00011 public:
00012 /**
00013  * constructor
00014  * @param *ain AnalogIn object
00015  * @param R0 5.0 ohm (default)
00016  * @param R1 4.95 ohm (default)
00017  * @param B 3324 (default)
00018  * @param T0 298.15 (default)
00019  */
00020     SMTC502AT(AnalogIn *ain, float R0=5.0, float R1=4.95, float B=3324, float T0=298.15) ;
00021 
00022 /**
00023  * destructor
00024  */
00025     ~SMTC502AT(void) ;
00026     
00027 /**
00028  * getTemp get temperature
00029  * @returns temperature in float format
00030  */
00031     float getTemp(void) ;
00032 private:
00033     AnalogIn *_ain ;
00034     float _r0 ;
00035     float _r1 ;
00036     float _b ;
00037     float _t0 ;
00038 } ;
00039 
00040 #endif /* _SMTC502AT_H_ */