pour donner à etudiants

Dependencies:   TMP102 mbed

Fork of TMP102HelloWorld by Chris Styles

Committer:
schnf30
Date:
Thu Mar 31 10:47:20 2016 +0000
Revision:
2:448ad66d65dc
Parent:
1:9b49379e8bf6
MIse a jour vers I2C number 2.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:89f745be63a8 1 #include "mbed.h"
chris 0:89f745be63a8 2 #include "TMP102.h"
chris 0:89f745be63a8 3
schnf30 2:448ad66d65dc 4 TMP102 temperature(p28, p27, 0x90); //A0 pin is connected to ground
schnf30 2:448ad66d65dc 5 Serial pc(USBTX, USBRX);
chris 0:89f745be63a8 6 int main()
chris 0:89f745be63a8 7 {
schnf30 2:448ad66d65dc 8 pc.printf("Hello \n\r");
chris 1:9b49379e8bf6 9 while(1) {
schnf30 2:448ad66d65dc 10 pc.printf("Temperature: %f\n\r", temperature.read());
chris 1:9b49379e8bf6 11 wait(1.0);
chris 1:9b49379e8bf6 12 }
chris 0:89f745be63a8 13 }