Update for STM32 NUCLEO BOARD

Dependencies:   TMP006_lib mbed

Fork of TMP006IR_HelloWorld by Christian Dupaty

main.cpp

Committer:
cdupaty
Date:
2016-06-18
Revision:
0:a64de73cdc52

File content as of revision 0:a64de73cdc52:

// Test capteur de temperature distant TMP006
// Realise a partir d'un document de Sam Kirsch.
// https://developer.mbed.org/users/sammacjunkie/notebook/tmp006-ir-temperature-sensor/
// http://www.ti.com/product/TMP006 


// Adaptation pour carte Nucleo avec microcontroleur STM32
// C.Dupaty 06-2016

#include "mbed.h"
#include "TMP006.h"
 
#define Address 0x80 

Serial pc(USBTX, USBRX);
DigitalOut led(LED1); 
TMP006 sensor(PB_9, PB_8, Address); 

int main()
{
  while(1) {
    printf("Temperature: %f \r \n", sensor.readObjTempC(Address));
    led=1;
    wait(0.3);
    led=0;
    wait(0.3);    
  }
}