projet capteur connecté ST/SE

Dependencies:   HP206C mbed HMC5883L DHT DS1820

Files at this revision

API Documentation at this revision

Comitter:
MathieuM
Date:
Tue Sep 25 15:07:43 2018 +0000
Parent:
27:d9dec879b7a6
Child:
30:6f84f406d273
Commit message:
misc

Changed in this revision

H_sol.cpp Show annotated file Show diff for this revision Revisions of this file
communication.cpp Show annotated file Show diff for this revision Revisions of this file
communication.h Show annotated file Show diff for this revision Revisions of this file
--- a/H_sol.cpp	Tue Sep 25 14:42:48 2018 +0000
+++ b/H_sol.cpp	Tue Sep 25 15:07:43 2018 +0000
@@ -1,5 +1,6 @@
 //florent
 #include "H_sol.h"
+#include "mbed.h"
 
 #define LOW_H 160
 #define HIGH_H 520
--- a/communication.cpp	Tue Sep 25 14:42:48 2018 +0000
+++ b/communication.cpp	Tue Sep 25 15:07:43 2018 +0000
@@ -12,6 +12,6 @@
 }
 
 char* genMessage(float h_sol) {
-    char m[12];
+    static char m[12];
     return m;
 }
\ No newline at end of file
--- a/communication.h	Tue Sep 25 14:42:48 2018 +0000
+++ b/communication.h	Tue Sep 25 15:07:43 2018 +0000
@@ -1,5 +1,10 @@
-#define SERIAL_PORT (D1, D0)
+#ifndef __COMMUNICATION__
+#define __COMMUNICATION__
+
+#define SERIAL_PORT D1, D0
 
 void initCommunication();
 void sendMessage(char* data);
-char* genMessage(float h_sol);
\ No newline at end of file
+char* genMessage(float h_sol);
+
+#endif
\ No newline at end of file