schneider françois
/
TMP102HelloWorld
pour donner à etudiants
Fork of TMP102HelloWorld by
Revision 2:448ad66d65dc, committed 2016-03-31
- Comitter:
- schnf30
- Date:
- Thu Mar 31 10:47:20 2016 +0000
- Parent:
- 1:9b49379e8bf6
- Commit message:
- MIse a jour vers I2C number 2.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Jul 21 22:41:38 2012 +0000 +++ b/main.cpp Thu Mar 31 10:47:20 2016 +0000 @@ -1,12 +1,13 @@ #include "mbed.h" #include "TMP102.h" -TMP102 temperature(p9, p10, 0x90); //A0 pin is connected to ground - +TMP102 temperature(p28, p27, 0x90); //A0 pin is connected to ground +Serial pc(USBTX, USBRX); int main() { + pc.printf("Hello \n\r"); while(1) { - printf("Temperature: %f\n", temperature.read()); + pc.printf("Temperature: %f\n\r", temperature.read()); wait(1.0); } }