ProjetSE_Emetteur

Dependencies:   mbed AM2320

Files at this revision

API Documentation at this revision

Comitter:
3521456
Date:
Tue Oct 15 12:13:52 2019 +0000
Commit message:
ProjetSE_Emetteur;

Changed in this revision

AM2320.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AM2320.lib	Tue Oct 15 12:13:52 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/yasuyuki/code/AM2320/#766868b34d56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 15 12:13:52 2019 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "AM2320.h"
+
+Serial ant(D1, D0); //tx, rx
+AM2320 cap(D4, D5);
+//Serial pc(D5, D4);
+char temp[4];
+int s = 0;
+
+int main() {
+    
+    while(1) {
+        if(s == 0){
+            cap.get();
+            sprintf(temp,"btemp = %d",cap.temperature()/10);
+        }
+        s = s+1;
+        if(s == 10000){
+            s=0;
+        }
+        int i = 0;
+        while(i < 100){
+            ant.puts(temp);
+            i = i +1;
+        }
+        wait(5);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 15 12:13:52 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file