Update for STM32 NUCLEO BOARD
Dependencies: TMP006_lib mbed
Fork of TMP006IR_HelloWorld by
Revision 0:a64de73cdc52, committed 2016-06-18
- Comitter:
- cdupaty
- Date:
- Sat Jun 18 17:34:46 2016 +0000
- Commit message:
- Update for STM32 NUCLEO BOARD
Changed in this revision
diff -r 000000000000 -r a64de73cdc52 TMP006_lib.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TMP006_lib.lib Sat Jun 18 17:34:46 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/sammacjunkie/code/TMP006_lib/#48c0564d877a
diff -r 000000000000 -r a64de73cdc52 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jun 18 17:34:46 2016 +0000 @@ -0,0 +1,28 @@ +// 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); + } +} \ No newline at end of file
diff -r 000000000000 -r a64de73cdc52 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jun 18 17:34:46 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file