Hello world code for PCT2075 and LM75B component class library. The PCT2075 is a temperature-to-digital converter featuring +/-1 degree-C accuracy over -25 degree-C to +100 degree-C range. It uses an on-chip band gap temperature sensor and Sigma-Delta A-to-D conversion technique with an overtemperature detection output that is a drop-in replacement for other LM75 series thermal sensors.

Dependencies:   PCT2075 mbed

main.cpp

Committer:
okano
Date:
2015-03-05
Revision:
2:edd678dcf504
Parent:
0:3c3d4c5ac8e9

File content as of revision 2:edd678dcf504:

/** Hello code for "PCT2075" and "LM75B" */

#include "mbed.h"
#include "PCT2075.h"
//#include "LM75B.h"

PCT2075 temp_sensor( p28, p27 );
//LM75B temp_sensor( p28, p27 );

int main()
{
    while(1) {
        printf( "temp = %7.3f\r\n", (float)temp_sensor );
        wait( 1 );
    }
}