BTS SNEC

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
rtk
Date:
Fri Oct 22 09:21:33 2021 +0000
Parent:
0:b2c100cfa6c9
Commit message:
Emission xbee

Changed in this revision

emet_xbee.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r b2c100cfa6c9 -r 0672144e8101 emet_xbee.cpp
--- a/emet_xbee.cpp	Wed Oct 20 17:18:34 2021 +0000
+++ b/emet_xbee.cpp	Fri Oct 22 09:21:33 2021 +0000
@@ -1,18 +1,16 @@
-#include "mbed.h"
-
+#include "mbed.h"//G com 9
 Serial xbee(PA_9,PA_10); //Initalise xbee_lib
 Serial pc(USBTX, USBRX); //Initalise PC serial comms
-int temperature = 82;
-int pression = 1234;
-int vit_rot = 5678;
-DigitalOut myled(LED2);
+
 int main()
 {
-    while(1) 
-         {
-               xbee.printf ("$MOTEUR,%d,%d,%d*",temperature,pression,vit_rot);
-               //pc.printf("$MOTEUR,%d,%d,%d*\n\r",temperature,pression,vit_rot);
-               wait(1);
-               myled=!myled;
-          }
+    pc.printf("Un simple emeteur");
+    while(1) {
+        for (int i=0; i<=100; i++) {
+            xbee.printf ("Coucou N %d\r\n",i);
+            pc.printf ("Envoie de : Coucou N %d\r\n",i);
+            wait(1);
+        }
+    }
 }
+