Programme d'exemple Thermistance Grove v1.2

Dependencies:   Grove_temperature

Files at this revision

API Documentation at this revision

Comitter:
bastienvincke
Date:
Tue Aug 13 16:41:57 2019 +0000
Parent:
0:21d86aae6b2a
Commit message:
V1 BV

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Aug 07 04:36:25 2018 +0000
+++ b/main.cpp	Tue Aug 13 16:41:57 2019 +0000
@@ -1,14 +1,11 @@
 #include "mbed.h"
 #include "Grove_temperature.h"
 
-Grove_temperature temp(A4);
-Serial pc(USBTX, USBRX);
+Grove_temperature temp(PA_1);                                                   // La thermistance est connecté sur le port ANA A1
 
-// main() runs in its own thread in the OS
 int main() {
-    pc.baud(115200);
     while (true) {
-        pc.printf("temperature = %2.2f\n", temp.getTemperature());
+        printf("temperature = %2.2f\n", temp.getTemperature());
         wait(1);
     }
 }