Projectlab Elektronica-ICT KULeuven

Dependencies:   EthernetInterface TMP102 TextLCD mbed-rtos mbed

werking.pdf

Temperature.cpp

Committer:
seppeduwe
Date:
2014-03-16
Revision:
3:344115c04cd0
Parent:
1:635e76c52151

File content as of revision 3:344115c04cd0:

#include "mbed.h"
#include "Temperature.h"
#include "TMP102.h"
Temperature::Temperature()
{
    temperature= new TMP102(p28, p27, 0x90); //A0 pin is connected to ground
}

//set the text on the display
float Temperature::getTemperature()
{
    return temperature->read();
}
//Legacy code
int Temperature::getTemperature4095()
{
    return (int) (37.227*(temperature->read()+25));

}