Projectlab Elektronica-ICT KULeuven

Dependencies:   EthernetInterface TMP102 TextLCD mbed-rtos mbed

werking.pdf

Temperature.cpp

Committer:
seppeduwe
Date:
2014-03-17
Revision:
4:466d859bfb13
Parent:
3:344115c04cd0

File content as of revision 4:466d859bfb13:

#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));

}