Simple test du capteur de température TMP102 La température est transmise sur UART virtuelle pour affichage dans un terminal La LED1 clignote pour signaler chaque mesure.

Dependencies:   TMP102 mbed

Fork of TMP102_HelloWorld by Christian Dupaty

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Sat Jul 21 22:41:38 2012 +0000
Parent:
0:89f745be63a8
Child:
2:0fba513ac57b
Commit message:
Hello world program for TMP102;

Changed in this revision

TMP102.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/TMP102.lib	Thu Apr 19 10:17:56 2012 +0000
+++ b/TMP102.lib	Sat Jul 21 22:41:38 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/chris/code/TMP102/#374d9678d5ad
+http://mbed.org/users/chris/code/TMP102/#7585766ad401
--- a/main.cpp	Thu Apr 19 10:17:56 2012 +0000
+++ b/main.cpp	Sat Jul 21 22:41:38 2012 +0000
@@ -1,11 +1,12 @@
 #include "mbed.h"
-
 #include "TMP102.h"
 
 TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground
 
 int main()
 {
-  printf("Temperature: %f\n", temperature.read());
-  return 0;
+  while(1) {
+    printf("Temperature: %f\n", temperature.read());
+    wait(1.0);
+  }
 }
--- a/mbed.bld	Thu Apr 19 10:17:56 2012 +0000
+++ b/mbed.bld	Sat Jul 21 22:41:38 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da
+http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da
\ No newline at end of file