Recent changes
Slingshot user guide
tag Guide, user
NFCLamp user guide
tag Guide, user
Homepage
MPL115A2
Compiler Error 42
From the mbed microcontroller Cookbook.  

TMP175 Temperature Sensor

The TMP175 and TMP75 are two-wire, serial output temperature sensors available in SO-8 and MSOP-8 packages. Requiring no external components, the TMP175 and TMP75 are capable of reading temperatures with a resolution of 0.0625°C.

The TMP175 and TMP75 are specified for operation over a temperature range of –40°C to +125°C.

Features

Code

#include "mbed.h"
#include "TMP175.h"
DigitalOut myled(LED1);
TMP175 mySensor(p9,p10);// sda,scl
LocalFileSystem local("mbedMemory"); 

int main(){
    char Fmt[100];
    float Temp;
    mySensor.vSetConfigurationTMP175(SHUTDOWN_MODE_OFF|COMPARATOR_MODE|POLARITY_0|FAULT_QUEUE_6|RESOLUTION_12,0x48); // Address -> A0,A1,A2=0
    mySensor.vSetTemperatureLowTMP175(25.0);
    mySensor.vSetTemperatureHighTMP175(35.0);
    
    FILE *fp = fopen("/mbedMemory/TMP175Debug.txt", "w"); 
    fprintf(fp, "TMP175/75 mbed NXP:\r\n"); 
    for(int k=0;k<100;k++){
        Temp=mySensor;
        sprintf(&Fmt[0],"Temperature: %f ºC\r\n",Temp);
        fprintf(fp,&Fmt[0]); 
        myled = 1;
        wait(0.5);
        myled = 0;
        wait(0.5);
    }
    fclose(fp);
    while(1);
}

/media/uploads/Suky/tmp175.png

» Import this programTMP175_Example

Example TMP175 Temperature Sensor

Library:

» Import this library into a programTMP175

TMP175 Temperature Sensor




calendar Page history
Last modified 03 Feb 2011, by   user Ale C.-   tag sensor, Temperature, TMP175 | 1 reply  

1 comment on TMP175 Temperature Sensor:

03 Feb 2012

hi guys,

I want to read temperature range from 0C to 30C. I have got a thermistor (type 2Kohm) in series with 2k2 resistance half bridge circuit output (Voltage divider ) connected to the mbed p20.

It looks simple but because I am not very experience on this, I seem to be confused.

Does anybody there how to do this? Please

Any help will be greatful!!

Thank you

A. Jay

Please login to post comments.